/* Digital Dunia Premium Dark UI for Document Expiry Manager */

/* Main App Wrapper overrides for WP Admin */
body.toplevel_page_document-expiry-manager #wpcontent,
body[class*="dem-"] #wpcontent {
    background: #020617;
    color: #cbd5e1;
}

.dem-wrap {
    max-width: 1200px;
    margin: 20px auto;
}

.dem-wrap h1 {
    color: #fff;
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.dem-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 24px;
    align-items: start;
}

/* Dashboard Stat Cards */
.dem-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 16px;
    margin: 24px 0 32px;
}

.dem-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 255, 0.15) !important;
    border-radius: 20px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 20px;
    backdrop-filter: blur(24px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dem-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.dem-card span {
    color: #94a3b8 !important;
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dem-card strong {
    color: #fff !important;
    display: block;
    font-size: 36px;
    font-weight: 900;
    line-height: 1.2;
    margin-top: 8px;
}

/* Status-based Card Accents */
.dem-card-valid { border-top: 4px solid #10b981 !important; }
.dem-card-soon { border-top: 4px solid #f59e0b !important; }
.dem-card-expired { border-top: 4px solid #ef4444 !important; }

/* Panels & Sections */
.dem-panel {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(148, 163, 255, 0.15) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(24px);
    color: #cbd5e1;
}

.dem-panel h2 {
    color: #fff !important;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 20px;
}

.dem-panel-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dem-panel-header h2 {
    margin: 0;
}

/* Filters Area */
.dem-filters {
    align-items: center;
    display: grid;
    grid-template-columns: 1.5fr repeat(4, minmax(110px, 1fr)) auto auto;
    gap: 12px;
    margin-bottom: 20px;
}

/* Form Fields */
.dem-form label,
.dem-settings label {
    display: block;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 13px;
    letter-spacing: 0.01em;
    margin: 16px 0 8px;
}

.dem-form input,
.dem-form select,
.dem-form textarea,
.dem-settings input,
.dem-settings textarea,
.dem-filters input,
.dem-filters select {
    background: rgba(2, 6, 23, 0.5) !important;
    color: #fff !important;
    border: 1px solid rgba(148, 163, 255, 0.2) !important;
    border-radius: 14px !important;
    padding: 12px 14px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
}

.dem-form input:focus,
.dem-form select:focus,
.dem-form textarea:focus,
.dem-settings input:focus,
.dem-settings textarea:focus,
.dem-filters input:focus,
.dem-filters select:focus {
    border-color: #06b6d4 !important;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    outline: none;
}

.dem-file-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(2, 6, 23, 0.3);
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(148, 163, 255, 0.3);
}

.dem-file-name {
    color: #94a3b8;
    font-weight: 500;
}

.dem-file-name a {
    color: #06b6d4;
    text-decoration: none;
}

.dem-file-name a:hover {
    text-decoration: underline;
}

/* Data Tables */
.dem-table {
    background: transparent !important;
    border: none !important;
    color: #cbd5e1;
}

.dem-table thead th {
    background: rgba(2, 6, 23, 0.8) !important;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(148, 163, 255, 0.2) !important;
    padding: 16px 12px !important;
}

.dem-table tbody tr {
    background: rgba(15, 23, 42, 0.3) !important;
    transition: background 0.2s;
}

.dem-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.5) !important;
}

.dem-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.8) !important;
}

.dem-table td {
    border-bottom: 1px solid rgba(148, 163, 255, 0.1) !important;
    padding: 16px 12px !important;
    vertical-align: middle;
}

.dem-table td strong {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.dem-table span {
    color: #94a3b8;
    font-size: 12px;
}

.dem-table a {
    color: #06b6d4;
    text-decoration: none;
    font-weight: 600;
}

.dem-table a:hover {
    text-decoration: underline;
}

.dem-delete {
    color: #ef4444 !important;
}

/* Status Badges */
.dem-status {
    border-radius: 999px;
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dem-status-valid {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dem-status-soon {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.dem-status-expired {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dem-empty {
    color: #94a3b8;
    margin-bottom: 0;
    text-align: center;
    padding: 32px;
    font-size: 16px;
}

/* Buttons */
.button-primary {
    background: linear-gradient(135deg, #4f46e5, #06b6d4) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 8px 24px !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.4) !important;
    transition: all 0.2s ease !important;
    text-shadow: none !important;
    cursor: pointer;
    margin-top: 16px;
}

.button-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.6) !important;
}

.button-secondary, .dem-upload-button, .dem-remove-file {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(148, 163, 255, 0.2) !important;
    color: #cbd5e1 !important;
    border-radius: 999px !important;
    padding: 8px 24px !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

.button-secondary:hover, .dem-upload-button:hover, .dem-remove-file:hover {
    background: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border-color: #06b6d4 !important;
}

.dem-remove-file {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}
.dem-remove-file:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: #ef4444 !important;
}


/* Frontend Shortcode Wrapper */
.dem-shortcode {
    margin: 32px 0;
    background: #020617;
    padding: 24px;
    border-radius: 24px;
    color: #cbd5e1;
    font-family: system-ui, -apple-system, sans-serif;
}

.dem-shortcode h2 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .dem-layout {
        grid-template-columns: 1fr;
    }

    .dem-cards,
    .dem-filters {
        grid-template-columns: 1fr;
    }
}


