/* ============================================
   Nathan Logistics - Rent Management System
   Professional Admin Panel CSS
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #EEF2FF;
    --secondary: #0F172A;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --bg: #F1F5F9;
    --card: #FFFFFF;
    --sidebar-bg: #0F172A;
    --sidebar-hover: #1E293B;
    --sidebar-active: #4F46E5;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }

/* ============ LOGIN PAGE ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #4F46E5 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
    top: -200px; right: -100px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    bottom: -100px; left: -50px;
}
.login-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 50px 40px;
    width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    position: relative;
    z-index: 1;
}
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}
.login-logo .icon {
    width: 65px; height: 65px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(79,70,229,0.3);
}
.login-logo h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.5px;
}
.login-logo p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}

/* ============ LAYOUT ============ */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
}
.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), #7C3AED);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}
.sidebar-brand h2 {
    color: #F8FAFC;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}
.sidebar-brand span {
    color: #94A3B8;
    font-size: 11px;
    font-weight: 500;
}
.sidebar-menu {
    padding: 15px 12px;
    flex: 1;
}
.sidebar-menu .menu-label {
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 12px 6px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    color: #94A3B8;
    border-radius: 8px;
    margin-bottom: 2px;
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-menu a:hover {
    background: var(--sidebar-hover);
    color: #E2E8F0;
}
.sidebar-menu a.active {
    background: var(--sidebar-active);
    color: white;
    font-weight: 600;
}
.sidebar-menu a .icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}
.sidebar-menu a .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.top-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 30px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}
.top-header .page-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}
.top-header .page-title p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-actions .notif-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}
.header-actions .notif-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
.header-actions .notif-btn .dot {
    position: absolute;
    top: 8px; right: 8px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
}
.user-menu .avatar {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 13px;
}
.user-menu span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* Content Area */
.content {
    padding: 25px 30px;
    flex: 1;
}

/* ============ CARDS ============ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary);
}
.card-body {
    padding: 22px;
}

/* ============ STAT CARDS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-card .stat-icon.blue { background: #EFF6FF; color: #3B82F6; }
.stat-card .stat-icon.green { background: #ECFDF5; color: #10B981; }
.stat-card .stat-icon.purple { background: #F5F3FF; color: #8B5CF6; }
.stat-card .stat-icon.amber { background: #FFFBEB; color: #F59E0B; }
.stat-card .stat-icon.red { background: #FEF2F2; color: #EF4444; }
.stat-card .stat-icon.indigo { background: #EEF2FF; color: #4F46E5; }
.stat-card .stat-info h4 {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
}
.stat-card .stat-info p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group label .required {
    color: var(--danger);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: white;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}
.form-control::placeholder {
    color: #94A3B8;
}
select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.form-row.three-col {
    grid-template-columns: repeat(3, 1fr);
}
.form-row.four-col {
    grid-template-columns: repeat(4, 1fr);
}
.form-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.input-group {
    position: relative;
}
.input-group .prefix {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}
.input-group .form-control {
    padding-left: 32px;
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #FAFBFC;
}
.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.file-upload input[type="file"] {
    display: none;
}
.file-upload .upload-icon {
    font-size: 28px;
    margin-bottom: 6px;
}
.file-upload p {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}
.file-upload .file-name {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: #059669;
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #DC2626;
}
.btn-outline {
    background: white;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}
.btn-lg {
    padding: 13px 28px;
    font-size: 15px;
}

/* ============ TABLE ============ */
.table-responsive {
    overflow-x: auto;
}
table.data-table {
    width: 100%;
    border-collapse: collapse;
}
table.data-table thead {
    background: #F8FAFC;
}
table.data-table th {
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    border-bottom: 2px solid var(--border);
}
table.data-table td {
    padding: 13px 16px;
    font-size: 13.5px;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text);
}
table.data-table tbody tr:hover {
    background: #F8FAFC;
}
table.data-table .status {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}
.status.active { background: #ECFDF5; color: #059669; }
.status.inactive { background: #FEF2F2; color: #DC2626; }
.status.pending { background: #FFFBEB; color: #D97706; }
.status.paid { background: #ECFDF5; color: #059669; }
.status.partial { background: #EFF6FF; color: #2563EB; }
.status.overdue { background: #FEF2F2; color: #DC2626; }
.status.expired { background: #F5F3FF; color: #7C3AED; }
.status.own { background: #ECFDF5; color: #059669; }
.status.rented { background: #EFF6FF; color: #2563EB; }

.action-btns {
    display: flex;
    gap: 6px;
}
.action-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}
.action-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.action-btn.view-btn:hover { color: var(--info); }
.action-btn.edit-btn:hover { color: var(--warning); }
.action-btn.del-btn:hover { background: #FEF2F2; border-color: var(--danger); color: var(--danger); }

/* ============ STEPPER ============ */
.stepper {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 40px;
}
.stepper .step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    position: relative;
}
.stepper .step:not(:last-child)::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 15px;
}
.stepper .step.active:not(:last-child)::after {
    background: var(--primary);
}
.stepper .step .step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}
.stepper .step.active .step-num {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.stepper .step.completed .step-num {
    background: var(--success);
    border-color: var(--success);
    color: white;
}
.stepper .step .step-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}
.stepper .step.active .step-label {
    color: var(--primary);
}

.step-content {
    display: none;
}
.step-content.active {
    display: block;
}
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ============ ALERTS ============ */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 500;
}
.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.alert-danger {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}
.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ============ NOTIFICATION ITEMS ============ */
.notif-list {
    list-style: none;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #F1F5F9;
    transition: var(--transition);
}
.notif-item:hover {
    background: #F8FAFC;
}
.notif-item.unread {
    background: #FAFBFF;
    border-left: 3px solid var(--primary);
}
.notif-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}
.notif-dot.critical { background: var(--danger); }
.notif-dot.warning { background: var(--warning); }
.notif-dot.info { background: var(--info); }
.notif-item .notif-text h4 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.notif-item .notif-text p {
    font-size: 12px;
    color: var(--text-muted);
}
.notif-item .notif-time {
    font-size: 11px;
    color: #94A3B8;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.empty-state p {
    font-size: 13px;
}

/* ============ REVIEW SECTION ============ */
.review-section {
    margin-bottom: 20px;
}
.review-section h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.review-item {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #F8FAFC;
    border-radius: 6px;
}
.review-item .label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    min-width: 130px;
}
.review-item .value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 12px; }
.hidden { display: none; }
.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row.three-col, .form-row.four-col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .content { padding: 15px; }
    .stepper { flex-direction: column; gap: 10px; padding: 0; }
    .stepper .step:not(:last-child)::after { display: none; }
}
