/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
}

.sidebar-header h2 i {
    margin-right: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-menu li a i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-menu li:hover a {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu li.active a {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 3px solid #3498db;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 0;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2c3e50;
    cursor: pointer;
}

.top-bar h1 {
    font-size: 24px;
    color: #2c3e50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info i {
    font-size: 24px;
    color: #2c3e50;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.card-content h3 {
    font-size: 28px;
    margin-bottom: 5px;
}

.card-content p {
    color: #666;
    font-size: 14px;
}

/* Forms */
.form-container {
    background: white;
    padding: 25px 30px;
    margin: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input[readonly] {
    background: #f5f5f5;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-edit {
    background: #f39c12;
    color: white;
    padding: 5px 10px;
}

.btn-edit:hover {
    background: #d68910;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 5px 8px;
    font-size: 12px;
}

/* Tables */
.table-container {
    background: white;
    padding: 25px 30px;
    margin: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
}

table tr:hover {
    background: #f8f9fa;
}

table tfoot td {
    font-weight: 600;
    border-top: 2px solid #dee2e6;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    margin: 0 30px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Search Bar */
.search-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-bar form {
    display: flex;
    flex: 1;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-bar button {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* Billing specific */
.billing-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px 30px;
}

.billing-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.billing-items {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }
    
    .form-container,
    .table-container {
        margin: 15px;
        padding: 20px;
    }
    
    .billing-container {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .top-bar {
        padding: 10px 15px;
    }
    
    .top-bar h1 {
        font-size: 18px;
    }
    
    .card {
        padding: 15px;
    }
    
    .card-content h3 {
        font-size: 22px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .search-bar form {
        flex-direction: column;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 6px 8px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Hamburger menu for mobile */
.menu-toggle {
    font-size: 28px;
    padding: 5px 10px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Current logo display */
.current-logo {
    text-align: center;
    margin: 10px 0;
}

.current-logo img {
    max-width: 150px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
}

.current-logo p {
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}