/* ==========================================================
   ADMIN MASTER DESIGN SYSTEM
   Extends admin_db.css - Minimal additions
========================================================== */

/* Submenu styling untuk sidebar Admin Master */
.db-nav-submenu {
    display: block;
    padding-left: 20px;
}

/* Memperhalus animasi Dropdown Submenu */
.db-nav-submenu.collapsing {
    transition: height 0.35s ease-in-out !important;
}

.db-nav-submenu .db-nav-item {
    font-size: 0.85rem;
    padding: 8px 14px;
    margin-bottom: 2px;
}

.db-nav-submenu .db-nav-item i {
    font-size: 0.85rem;
    width: 20px;
}

/* Parent menu toggle */
.db-nav-parent {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.db-nav-parent .nav-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.35s ease-in-out;
    color: #9ca3af;
}

.db-nav-parent[aria-expanded="true"] .nav-arrow {
    transform: rotate(90deg);
}

.db-nav-item {
    transition: all 0.25s ease-out;
}

.db-nav-item:hover {
    transform: translateX(4px);
}

/* Badge status */
.badge-aktif {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-nonaktif {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Stat cards for dashboard */
.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-icon.green { background: #ecfdf5; color: #059669; }
.stat-icon.blue { background: #eff6ff; color: #2563eb; }
.stat-icon.amber { background: #fffbeb; color: #d97706; }
.stat-icon.red { background: #fef2f2; color: #dc2626; }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon.teal { background: #f0fdfa; color: #0d9488; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Section headers on dashboard */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: 28px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.section-header:first-child {
    margin-top: 0;
}

.section-header h6 {
    font-weight: 600;
    color: #374151;
    margin: 0;
    font-size: 0.95rem;
}

.section-header i {
    color: #059669;
    font-size: 1rem;
}

/* Profil card */
.profil-card {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    border-radius: 10px;
    padding: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.profil-card .logo-wrapper {
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profil-card .logo-wrapper img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.profil-card .profil-info h5 {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1.1rem;
}

.profil-card .profil-info p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

/* Activity log items */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.login { background: #059669; }
.activity-dot.tambah { background: #2563eb; }
.activity-dot.edit { background: #d97706; }
.activity-dot.hapus { background: #dc2626; }
.activity-dot.lainnya { background: #6b7280; }

.activity-text {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

.activity-time {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* Back to master button */
.btn-back-master {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-back-master:hover {
    background: #059669;
    color: white;
    border-color: #059669;
}

/* Table enhancements */
.table-master thead th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 12px;
}

.table-master tbody td {
    padding: 12px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
}

.table-master tbody tr:hover {
    background: #f9fafb;
}

/* Tab nav for pages with sub-sections */
.nav-tab-master .nav-link {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    border-radius: 0;
}

.nav-tab-master .nav-link.active {
    color: #059669;
    border-bottom-color: #059669;
    background: transparent;
}

.nav-tab-master .nav-link:hover:not(.active) {
    color: #374151;
    border-bottom-color: #d1d5db;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    font-size: 0.9rem;
    margin: 0;
}
