/* RND-Computers Customer Portal Styles */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Heebo', sans-serif;
    line-height: 1.6;
    color: #2d3748;
    direction: rtl;
    background: #f0f4f8;
    min-height: 100vh;
}

/* ==================== AUTH PAGES ==================== */
.auth-page {
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 50%, #1a365d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    color: #1a365d;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
}

.auth-logo {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
}

.auth-header h2 {
    color: #2d3748;
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-header p {
    color: #718096;
    font-size: 14px;
}

/* Admin Auth Badge */
.admin-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.admin-badge i {
    font-size: 36px;
    color: white;
}

/* Form Styles */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

.auth-form label i {
    color: #3182ce;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: #3182ce;
    background: white;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-left: 50px;
}

.toggle-password {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 5px;
}

.toggle-password:hover {
    color: #3182ce;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.4);
}

.btn-outline {
    background: transparent;
    color: #1a365d;
    border: 2px solid #1a365d;
}

.btn-outline:hover {
    background: #1a365d;
    color: white;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-block {
    width: 100%;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #718096;
    margin-bottom: 12px;
}

.auth-footer a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096 !important;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.alert i {
    font-size: 20px;
    margin-top: 2px;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
    border: 1px solid #68d391;
}

.alert-warning {
    background: #fefcbf;
    color: #975a16;
    border: 1px solid #f6e05e;
}

.alert-actions {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a365d 0%, #2c5282 100%);
    color: white;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.admin-sidebar {
    background: linear-gradient(180deg, #1a202c 0%, #2d3748 100%);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header .logo {
    text-decoration: none;
    color: inherit;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-right-color: #63b3ed;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item.logout {
    color: #fc8181;
}

.nav-item.logout:hover {
    background: rgba(252, 129, 129, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 260px;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 16px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2d3748;
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logout-btn-mobile {
    display: none;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.logout-btn-mobile:hover {
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    transform: scale(1.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-avatar.admin {
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header p {
    color: #718096;
    margin-top: 8px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
}

.back-btn:hover {
    color: #3182ce;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #38a169 0%, #68d391 100%);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #dd6b20 0%, #f6ad55 100%);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1a365d;
}

.stat-info p {
    color: #718096;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 18px;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f7fafc;
}

.data-table code {
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
}

/* Product Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.product-icon.large {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.product-info strong {
    display: block;
    color: #1a365d;
}

.product-info small {
    color: #718096;
    font-size: 12px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #c6f6d5;
    color: #276749;
}

.status-expiring {
    background: #fefcbf;
    color: #975a16;
}

.status-expired {
    background: #fed7d7;
    color: #c53030;
}

.status-unknown {
    background: #e2e8f0;
    color: #4a5568;
}

.status-pending {
    background: #bee3f8;
    color: #2b6cb0;
}

.status-in_progress {
    background: #fefcbf;
    color: #975a16;
}

.status-completed {
    background: #c6f6d5;
    color: #276749;
}

.status-badge.large {
    padding: 8px 16px;
    font-size: 14px;
}

/* Serial Number */
.serial-number {
    background: #edf2f7;
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1a365d;
}

.serial-number.large {
    font-size: 16px;
    padding: 8px 16px;
}

.copy-btn {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #edf2f7;
    color: #3182ce;
}

.copy-btn.copied {
    color: #38a169;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #4a5568;
    margin-bottom: 10px;
}

.empty-state p {
    color: #718096;
    margin-bottom: 20px;
}

.empty-state.small {
    padding: 30px 20px;
}

.empty-state.small i {
    font-size: 40px;
}

/* Quick Actions */
.quick-actions {
    margin-top: 30px;
}

.quick-actions h2 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 16px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: #1a365d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.action-card i {
    font-size: 32px;
    color: #3182ce;
    margin-bottom: 12px;
}

.action-card span {
    display: block;
    font-weight: 500;
}

/* Purchases Grid */
.purchases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.purchase-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.purchase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.purchase-header {
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.purchase-body {
    padding: 24px;
}

.purchase-body h3 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 16px;
}

.purchase-details {
    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.detail-item i {
    color: #3182ce;
    width: 20px;
    margin-top: 4px;
}

.detail-item span {
    flex: 1;
}

.detail-item small {
    display: block;
    color: #718096;
    font-size: 12px;
}

.detail-item strong,
.detail-item code {
    display: block;
    color: #1a365d;
}

.product-description {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    font-size: 14px;
}

.purchase-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

/* Search & Filter */
.search-filter {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: #3182ce;
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #3182ce;
    color: #3182ce;
}

.filter-btn.active {
    background: #3182ce;
    border-color: #3182ce;
    color: white;
}

/* Detail Grid */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-list {
    display: grid;
    gap: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #718096;
}

.detail-value {
    font-weight: 500;
    color: #1a365d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.description-section,
.notes-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.description-section h4,
.notes-section h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 16px;
}

.description-section p,
.notes-section p {
    color: #718096;
    line-height: 1.8;
}

/* Timeline */
.timeline {
    position: relative;
    padding-right: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    right: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3182ce;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #3182ce;
}

.timeline-marker.completed {
    background: #38a169;
    box-shadow: 0 0 0 2px #38a169;
}

.timeline-marker.pending {
    background: #718096;
    box-shadow: 0 0 0 2px #718096;
}

.timeline-content {
    background: #f7fafc;
    padding: 16px;
    border-radius: 12px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-header h4 {
    color: #1a365d;
    font-size: 16px;
}

.timeline-date {
    color: #718096;
    font-size: 14px;
}

.timeline-content p {
    color: #4a5568;
    font-size: 14px;
}

.timeline-meta {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.service-cost {
    color: #dd6b20;
    font-weight: 600;
}

/* Actions Row */
.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: #3182ce;
}

.profile-form input:disabled {
    background: #f7fafc;
    color: #718096;
}

.form-hint {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 6px;
}

/* Admin Forms */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #3182ce;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.form-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 10px;
    margin-top: 20px;
}

.form-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #718096;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-info p:last-child {
    margin-bottom: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #3182ce;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Simple List */
.simple-list {
    display: grid;
    gap: 12px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3182ce 0%, #63b3ed 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.list-item-content {
    flex: 1;
}

.list-item-content strong {
    display: block;
    color: #1a365d;
}

.list-item-content small {
    color: #718096;
    font-size: 12px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* Customer Info Bar */
.customer-info-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.customer-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
}

.customer-info-item i {
    color: #3182ce;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .logout-btn-mobile {
        display: flex;
    }
    
    .top-bar {
        padding: 12px 16px;
    }
    
    .dashboard-content {
        padding: 16px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .purchases-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .filter-buttons {
        width: 100%;
        overflow-x: auto;
    }
    
    .search-filter {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .card-header,
    .card-body {
        padding: 16px;
    }
    
    .purchase-card {
        border-radius: 12px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .menu-toggle,
    .btn,
    .action-buttons {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
    }
    
    .dashboard-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

