/**
 * MECASOS Admin Styles
 * Design System: Black (#1D1D1B) & Gold (#E1A004)
 */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F5F5F5;
    color: #333;
    line-height: 1.6;
}

/* Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Header */
.admin-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1D1D1B;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    color: #E1A004;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E1A004, #F5B504);
    color: #1D1D1B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.admin-info {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-weight: 600;
    font-size: 14px;
}

.admin-role {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.btn-logout {
    color: white;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #E1A004;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 260px;
    height: calc(100vh - 64px);
    background: white;
    border-right: 1px solid #E5E5E5;
    overflow-y: auto;
    z-index: 999;
    transition: transform 0.3s;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-nav {
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #F8F8F8;
    color: #1D1D1B;
}

.nav-item.active {
    background: #FFF8E7;
    color: #E1A004;
    border-left-color: #E1A004;
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
}

/* Main Content */
.admin-content {
    margin-left: 260px;
    margin-top: 64px;
    padding: 32px;
    width: calc(100% - 260px);
    min-height: calc(100vh - 64px);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1D1D1B;
    margin-bottom: 8px;
}

.page-subtitle {
    color: #666;
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary {
    background: #E1A004;
    color: white;
}

.stat-icon.success {
    background: #10B981;
    color: white;
}

.stat-icon.warning {
    background: #F59E0B;
    color: white;
}

.stat-icon.danger {
    background: #EF4444;
    color: white;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1D1D1B;
    margin-bottom: 4px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1D1D1B;
}

.card-body {
    padding: 24px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #F8F8F8;
}

th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #F0F0F0;
}

tr:hover {
    background: #FAFAFA;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-primary {
    background: #FFF8E7;
    color: #E1A004;
}

.badge-secondary {
    background: #F3F4F6;
    color: #4B5563;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #E1A004, #F5B504);
    color: #1D1D1B;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 160, 4, 0.3);
}

.btn-secondary {
    background: #F3F4F6;
    color: #4B5563;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.page-link {
    padding: 8px 12px;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    background: #F3F4F6;
    color: #1D1D1B;
}

.page-link.active {
    background: #E1A004;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1D1D1B;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E5E5E5;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #E1A004;
    box-shadow: 0 0 0 3px rgba(225, 160, 4, 0.1);
}

select.form-control {
    cursor: pointer;
}

/* Footer */
.admin-footer {
    background: white;
    border-top: 1px solid #E5E5E5;
    padding: 16px 24px;
    text-align: center;
    margin-left: 260px;
    margin-top: 32px;
}

.footer-content {
    color: #666;
    font-size: 13px;
}

.footer-version {
    margin-top: 4px;
    color: #999;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content, .admin-footer {
        margin-left: 0;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-info {
        display: none;
    }
}
