/* ==============================
   SEMMAI AASAN – BOOTSTRAP ADMIN
================================ */

/* Root */
.semmai-admin {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
    color: #212529;
}

/* Card */
.semmai-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

/* Headings */
.semmai-admin h1,
.semmai-admin h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Tables (Bootstrap-like) */
.semmai-admin .widefat {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
}

.semmai-admin .widefat thead th {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    padding: 12px 14px;
}

.semmai-admin .widefat tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #e9ecef;
}

/* Status badges */
.semmai-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
}

.semmai-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.semmai-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Forms */
.semmai-admin .form-table th {
    width: 200px;
    font-weight: 600;
    padding-top: 12px;
}

.semmai-admin input[type="text"],
.semmai-admin input[type="email"],
.semmai-admin input[type="password"],
.semmai-admin select {
    width: 360px;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color .15s ease-in-out;
}

.semmai-admin input:focus,
.semmai-admin select:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .15);
}

/* Buttons */
.semmai-admin .button-primary {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
    border-radius: 6px;
    padding: 6px 16px;
    font-weight: 500;
}

.semmai-admin .button {
    border-radius: 6px;
}

/* Action links */
.semmai-actions a {
    font-weight: 500;
    margin-right: 10px;
}

.semmai-actions .delete {
    color: #dc2626;
}

/* Notices */
.semmai-admin .notice-success {
    border-left-color: #22c55e;
}

.semmai-admin .notice-error {
    border-left-color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {

    .semmai-admin input,
    .semmai-admin select {
        width: 100%;
    }
}

/* ==========================
   SEMMAI FORM DESIGN
========================== */

.semmai-form-card {
    max-width: 900px;
}

.semmai-form h1 {
    margin-bottom: 25px;
}

/* Form groups */
.semmai-form-group {
    display: flex;
    flex-direction: column;
}

/* Inputs */
.semmai-form input[type="text"],
.semmai-form input[type="email"],
.semmai-form input[type="password"],
.semmai-form select {
    height: 42px;
    font-size: 14px;
    padding: 8px 12px;
}

/* Labels */
.form-table th {
    vertical-align: top;
    padding-top: 12px;
}

.form-table th::after {
    content: " *";
    color: #dc2626;
}

/* Help text */
.semmai-help {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Buttons area */
.semmai-form .button-primary {
    min-width: 120px;
}

.semmai-form .button {
    margin-left: 8px;
}

/* Error messages */
.semmai-admin .notice-error {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.semmai-admin .notice-success {
    background: #ecfdf5;
    border-left-color: #22c55e;
}

/* Mobile */
@media (max-width: 768px) {

    .form-table,
    .form-table tbody,
    .form-table tr,
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
    }

    .form-table th {
        padding-bottom: 6px;
    }
}

.semmai-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.semmai-modal-content {
    background: #fff;
    width: 460px;
    padding: 25px;
    border-radius: 10px;
}

.semmai-modal textarea {
    width: 100%;
    height: 120px;
    padding: 10px;
    margin-top: 10px;
}

.modal-actions {
    text-align: right;
    margin-top: 15px;
}

.semmai-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.semmai-pending {
    background: #fff4e5;
    color: #b45309;
    border: 1px solid #facc15;
}

.semmai-approved {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #34d399;
}

.semmai-rejected {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

/* ==========================
   BACK BUTTON STYLE
========================== */

.semmai-btn-back {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px;
    padding: 6px 16px !important;
    font-weight: 500 !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s ease-in-out;
}

.semmai-btn-back:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #9ca3af !important;
}

.semmai-btn-back:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, .2);
}

.semmai-form p {
    /* display: flex;
    align-items: center;*/
    text-align: right;
    margin-top: 20px;
}

/* Filter bar */
.semmai-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.semmai-search {
    width: 260px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.semmai-filter {
    width: 160px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
}

/* Pagination */
.semmai-pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
}

.semmai-pagination a {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    color: #374151;
}

.semmai-pagination a.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.semmai-pagination a:hover {
    background: #e5e7eb;
}

/* ==========================
   TAMIL FONT ARCHITECTURE
========================== */

/* Explicitly protect WordPress icons from font overrides */
.mce-ico,
.mce-i-*,
.dashicons,
.dashicons-before::before,
[class^="mce-i-"],
[class*=" mce-i-"] {
    font-family: 'tinymce', 'dashicons', '-apple-system', 'BlinkMacSystemFont', "Segoe UI", 'Roboto', 'Inter', sans-serif !important;
}

.semmai-admin,
.semmai-admin *:not(.mce-ico):not([class^="mce-i-"]):not(.dashicons) {
    font-family: 'Noto Sans Tamil', 'Latha', 'Vijaya', sans-serif !important;
}

.semmai-admin {
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

.semmai-admin h1,
.semmai-admin h2 {
    font-weight: 600;
}

.semmai-table .badge.active {
    color: green;
    font-weight: bold;
}

.semmai-table .badge.inactive {
    color: red;
    font-weight: bold;
}

.icon {
    font-size: 16px;
    margin-right: 8px;
    text-decoration: none;
}

.icon.edit {
    color: #2271b1;
}

.icon.delete {
    color: red;
}

.approval-timeline {
    margin-top: 10px;
    padding-left: 20px;
    border-left: 3px solid #ddd;
}

.timeline-item {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    position: relative;
}

.timeline-item::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #999;
    border-radius: 50%;
    position: absolute;
    left: -18px;
    top: 12px;
}

.timeline-item.approved {
    border-left: 4px solid #28a745;
}

.timeline-item.rejected {
    border-left: 4px solid #dc3545;
}

.timeline-reason {
    margin-top: 5px;
    color: #b30000;
    font-weight: bold;
}

.semmai-dashboard {
    margin-top: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dash-card {
    padding: 25px;
    border-radius: 12px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .1);
}

.dash-card h3 {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.dash-card p {
    margin: 10px 0 0;
    font-size: 32px;
}

/* COLORS */
.dash-card.blue {
    background: #0073aa;
}

.dash-card.orange {
    background: #ff9800;
}

.dash-card.green {
    background: #28a745;
}

.dash-card.red {
    background: #dc3545;
}

.dash-card.purple {
    background: #6f42c1;
}