/* ==========================================
   SINERGI SYSTEM - GLOBAL STYLES
   Common styles used across all pages
   ========================================== */

/* CSS Variables */
:root {
    --sinergi-dark: #0f172a;
    --sinergi-primary: #083d91;
    --sinergi-secondary: #475569;
    --sinergi-border: rgba(15, 23, 42, 0.08);
    --sinergi-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --sinergi-shadow-hover: 0 24px 55px rgba(15, 23, 42, 0.12);
}

/* Global Body */
body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 18px;
    margin-bottom: 1.5rem;
    background: #ffffff;
    box-shadow: var(--sinergi-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sinergi-shadow-hover);
}

.card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--sinergi-border);
    color: var(--sinergi-dark);
    font-weight: 600;
}

.card .card-body {
    padding: 1.5rem;
    color: var(--sinergi-secondary);
}

.card .card-title,
.card h5 {
    color: var(--sinergi-dark);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Status Badge */
.status-badge {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* Table Responsive */
.table-responsive {
    border-radius: 0.75rem;
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Alert Messages */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Utility Classes */
.text-primary {
    color: var(--sinergi-primary) !important;
}

.bg-primary {
    background-color: var(--sinergi-primary) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: var(--sinergi-shadow) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        border-radius: 12px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

/* ==========================================
   NAVBAR DROPDOWN REFINEMENT
   ========================================== */
.navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    padding: 0.5rem;
    margin-top: 10px !important;
    font-size: 0.85rem;
    min-width: 190px;
    border: 1px solid rgba(15, 23, 42, 0.05);
    animation: dropdownFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-weight: 500;
    color: var(--sinergi-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 2px;
}

.navbar .dropdown-item:last-child {
    margin-bottom: 0;
}

.navbar .dropdown-item:hover {
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--sinergi-primary);
    transform: translateX(3px);
}

.navbar .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

.navbar .dropdown-divider {
    margin: 0.4rem 0.5rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.navbar .dropdown-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    padding: 0.5rem 0.85rem 0.25rem;
}

/* ==========================================
   TABLE SYSTEM - UNIFIED STYLES
   Digunakan di semua halaman list/tabel
   ========================================== */

/* Table Container (wrapper utama) */
.table-container {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sinergi-shadow);
    transition: box-shadow 0.2s ease;
}

.table-container:hover {
    box-shadow: var(--sinergi-shadow-hover);
}

/* Table Header */
.table-container .table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid var(--sinergi-border);
    border-top: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sinergi-secondary);
    padding: 0.875rem 0.75rem;
    white-space: nowrap;
}

/* Table Body Row */
.table-container .table tbody tr {
    transition: background-color 0.15s ease, border-left 0.15s ease;
    border-left: 3px solid transparent;
    animation: tableRowIn 0.25s ease-out both;
}

.table-container .table tbody tr:hover {
    background-color: rgba(37, 99, 235, 0.04);
    border-left-color: var(--sinergi-primary);
}

/* Table Body Cell */
.table-container .table tbody td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--sinergi-border);
}

.table-container .table tbody tr:last-child td {
    border-bottom: none;
}

/* Row entrance animation */
@keyframes tableRowIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.table-container .table tbody tr:nth-child(1) { animation-delay: 0.03s; }
.table-container .table tbody tr:nth-child(2) { animation-delay: 0.06s; }
.table-container .table tbody tr:nth-child(3) { animation-delay: 0.09s; }
.table-container .table tbody tr:nth-child(4) { animation-delay: 0.12s; }
.table-container .table tbody tr:nth-child(5) { animation-delay: 0.15s; }
.table-container .table tbody tr:nth-child(6) { animation-delay: 0.18s; }
.table-container .table tbody tr:nth-child(7) { animation-delay: 0.21s; }
.table-container .table tbody tr:nth-child(8) { animation-delay: 0.24s; }

/* Cell Title */
.cell-title,
.proposal-title,
.post-title {
    font-weight: 600;
    color: var(--sinergi-dark);
    font-size: 0.875rem;
    line-height: 1.4;
}

.cell-title a,
.proposal-title a,
.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cell-title a:hover,
.proposal-title a:hover,
.post-title a:hover {
    color: var(--sinergi-primary);
    text-decoration: underline;
}

/* Cell Meta (informasi sekunder di bawah judul) */
.cell-meta,
.proposal-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: 0.25rem;
}

.cell-meta small,
.proposal-meta small {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--sinergi-secondary);
}

.cell-meta small i,
.proposal-meta small i {
    width: 14px;
    color: var(--sinergi-primary);
    opacity: 0.7;
}

/* Status Badge (pill) */
.badge-status {
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.2px;
    display: inline-block;
    line-height: 1;
}

/* Action Button Container */
.action-icons {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Action Icon Button (32x32, border-radius 8px) */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-icon i {
    font-size: 0.825rem;
}

/* Result Info Bar (tampilkan jumlah hasil di atas tabel) */
.result-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.result-info h5 {
    margin: 0;
    color: var(--sinergi-dark);
}

.result-count {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--sinergi-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Table Empty State */
.table-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--sinergi-secondary);
}

.table-empty-state i {
    font-size: 2.5rem;
    color: #c9d1d9;
    display: block;
    margin-bottom: 0.75rem;
}

/* User Info Cell (user_list) */
.table-user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.table-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sinergi-primary) 0%, #6d28d9 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.table-user-details h6 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sinergi-dark);
}

.table-user-details small {
    font-size: 0.775rem;
    color: var(--sinergi-secondary);
}

/* Role Badge (user_list) */
.badge-role {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 20px;
}

/* Deadline styling (reviewer) */
.deadline-text {
    font-weight: 500;
    color: var(--sinergi-dark);
    font-size: 0.875rem;
}

.deadline-text.urgent {
    color: #dc3545;
    font-weight: 600;
}

/* Schema count link (period list) */
.schema-count-link {
    color: var(--sinergi-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.schema-count-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-container .table thead th {
        font-size: 0.7rem;
        padding: 0.75rem 0.5rem;
    }

    .table-container .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.82rem;
    }

    .table-container .table tbody tr:hover {
        border-left-color: transparent;
    }

    .btn-icon {
        width: 28px;
        height: 28px;
    }

    .action-icons {
        gap: 0.25rem;
    }
}

/* ==========================================
   PROFESSIONAL FOOTER STYLES
   ========================================== */

.footer-main {
    background-color: #0f172a; /* Slate 900 */
    color: #94a3b8; /* Slate 400 */
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.footer-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.footer-title {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.footer-tagline {
    color: #64748b; /* Slate 500 */
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0;
}

.footer-desc {
    line-height: 1.6;
    margin-top: 1.25rem;
    color: #94a3b8;
}

.footer-heading {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--sinergi-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-contact-info .contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.footer-contact-info .contact-item i {
    color: var(--sinergi-primary);
    margin-top: 4px;
    font-size: 1rem;
}

.footer-contact-info .contact-item span {
    line-height: 1.5;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-icon:hover {
    background: var(--sinergi-primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    border-color: var(--sinergi-primary);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright-text {
    font-size: 0.85rem;
    color: #64748b;
}

.copyright-text strong {
    color: #94a3b8;
}

.footer-legal a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #ffffff;
}

@media (max-width: 991px) {
    .footer-main {
        padding: 60px 0 30px;
    }
    .footer-heading {
        margin-top: 1rem;
    }
}
