@font-face {
    font-family: 'Satoshi-Regular';
    src: url('../fonts/Satoshi-Regular.woff2') format('woff2'),
         url('../fonts/Satoshi-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Fallback: If Satoshi font is not available, use system fonts with similar characteristics */
@supports not (font-family: 'Satoshi-Regular') {
    @font-face {
        font-family: 'Satoshi-Regular';
        src: local('Inter'), local('Segoe UI'), local('Roboto'), local('Arial');
    }
}

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

body {
    font-family: 'Satoshi-Regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 50%, #e8f4f8 100%);
    min-height: 100vh;
    color: #2c3e50;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 248, 255, 0.98) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 4px 0 20px rgba(135, 206, 250, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.sidebar-header .logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.sidebar-header .logo-container img {
    height: 50px;
    width: auto;
    border-radius: 8px;
}

.sidebar-header .logo-container h1 {
    color: #4a90e2;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.sidebar-subtitle {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin: 0;
    padding-left: 4.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    margin: 0.25rem 0;
}

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

.nav-item:hover {
    background: rgba(74, 144, 226, 0.08);
    color: #4a90e2;
    border-left-color: #4a90e2;
}

.nav-item.active {
    background: rgba(74, 144, 226, 0.15);
    color: #4a90e2;
    border-left-color: #4a90e2;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(74, 144, 226, 0.1);
    background: rgba(255, 255, 255, 0.5);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4a90e2 0%, #5ba3f5 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.75rem;
    color: #7f8c8d;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-logout:hover {
    background: #e74c3c;
    color: white;
}

.btn-logout svg {
    stroke: currentColor;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 50%, #e8f4f8 100%);
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Satoshi-Regular', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #5ba3f5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #4a90e2;
    border: 2px solid #4a90e2;
}

.btn-secondary:hover {
    background: #4a90e2;
    color: white;
}

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

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.container h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(135, 206, 250, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.1);
}

.card-header h2 {
    color: #4a90e2;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Count Cards */
.count-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.count-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(135, 206, 250, 0.15);
    transition: transform 0.3s ease;
}

.count-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(135, 206, 250, 0.3);
}

.count-card h3 {
    color: #7f8c8d;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.count-card .count {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4a90e2;
    margin-bottom: 0.3rem;
}

.count-card .change {
    font-size: 0.7rem;
    color: #27ae60;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(74, 144, 226, 0.2);
    border-radius: 8px;
    font-family: 'Satoshi-Regular', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
}

table thead {
    background: linear-gradient(135deg, #4a90e2 0%, #5ba3f5 100%);
    color: white;
}

table th {
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
    font-size: 0.85rem;
}

table tbody tr:hover {
    background: rgba(74, 144, 226, 0.05);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-icon {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-icon.plus {
    background: #27ae60;
    color: white;
}

.btn-icon.minus {
    background: #e67e22;
    color: white;
}

.btn-icon.sold {
    background: #9b59b6;
    color: white;
}

.btn-icon:hover {
    transform: scale(1.05);
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(135, 206, 250, 0.15);
}

.chart-card h3 {
    color: #4a90e2;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.login-left {
    background: linear-gradient(135deg, #4a90e2 0%, #5ba3f5 50%, #6bb6ff 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 20s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
}

.login-logo {
    margin-bottom: 2rem;
}

.login-logo img {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.login-left h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.login-left .tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.login-left .description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.login-left .features {
    text-align: left;
    margin-top: 2rem;
}

.login-left .features h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.login-left .features ul {
    list-style: none;
    padding: 0;
}

.login-left .features li {
    padding: 0.5rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-left .features li::before {
    content: '✓';
    background: rgba(255, 255, 255, 0.3);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.login-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 50%, #e8f4f8 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(135, 206, 250, 0.3);
    width: 100%;
    max-width: 450px;
}

.login-card h2 {
    color: #4a90e2;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.login-card .welcome-text {
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: #fee;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.alert-success {
    background: #d4edda;
    color: #27ae60;
    border: 1px solid #27ae60;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    margin: 5% auto;
    padding: 1.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.1);
}

.modal-header h2 {
    font-size: 1.1rem;
    color: #4a90e2;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #4a90e2;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .login-container {
        grid-template-columns: 1fr;
    }
    
    .login-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .count-cards {
        grid-template-columns: 1fr;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
    }
}

