* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Mont', sans-serif;
}

body {
    position: relative;
    background: url(/img/system/ogimg.jpg) no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(transparent, var(--c1));
    opacity: .5;
}

#login {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    z-index: 23;
}

#login-button {
    background: var(--c1);
    color: var(--w);
    max-width: 90%;
    margin: 10px auto;
    padding: 10px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

#login-button:hover {
    background: var(--c2);
    color: var(--c1);
}

.logo {
    margin-bottom: 30px;
}

.logo h1 {
    color: var(--c1);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 30px;
}

.logo p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--c1);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: 'Mont', sans-serif;
    font-weight: 600;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

.footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 12px;
}

@media (max-width: 480px) {
    #login {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* CRM Header and Navigation */
#crm-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 45;
}

#crm-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.crm-logo {
    height: 40px;
}

.logo-section h1 {
    font-size: 1.5em;
    color: #333;
    margin: 0;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    color: #333;
}

.user-email {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

#crm-navigation {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease;
}

.nav-item.active a,
.nav-item a:hover {
    background: white;
    color: #333;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

.nav-item.logout {
    margin-left: auto;
}

.nav-item.logout a {
    color: #dc3545;
}

.nav-item.logout a:hover {
    background: #dc3545;
    color: white;
}

.nav-icon {
    font-size: 1.2em;
}

#crm-content {
    flex: 1;
    background: #f5f5f5;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* CRM Pages Styles */
.crm-page {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #333;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-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;
}

.stat-icon {
    font-size: 2em;
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Tables */
.bookings-table, .services-table, .events-table, .transactions-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bookings-table th, .services-table th, .events-table th, .transactions-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.bookings-table td, .services-table td, .events-table td, .transactions-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.price {
    text-align: right;
    font-weight: 600;
}

.status.active {
    color: #28a745;
    font-weight: 600;
}

.status.cancelled {
    color: #dc3545;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.empty-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
}

/* Credit Balance */
.credit-balance {
    margin-bottom: 30px;
}

.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-icon {
    font-size: 3em;
}

.balance-amount {
    font-size: 2.5em;
    font-weight: bold;
}

/* Form Styles */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-help {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-btn {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-decoration: none;
    color: #333;
    text-align: center;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-icon {
    font-size: 2em;
}

body.crm .col-md-8 .rightpart h2 {
    margin-bottom: -8px;
}

/* Responsive */
@media (max-width: 768px) {
    .crm-page {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .balance-card {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-item {
        flex: 1;
        min-width: 120px;
    }
    
    .nav-item a {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
        font-size: 0.9em;
    }
    
    .nav-item.logout {
        margin-left: 0;
        order: 99;
    }
}