/* Modern Reset & Base Styles */
:root {
    --primary-color: #D4AF37; /* Gold/Premium accent */
    --primary-hover: #b5952f;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-body: #f4f7f6;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(212, 175, 55, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(212, 175, 55, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

/* Glassmorphism Container */
.app-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

/* Login Screen */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    transition: transform 0.3s ease;
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-img {
    max-width: 280px;
    height: auto;
    
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* Dashboard Layout */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 10px;
}

.user-welcome h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.user-welcome p {
    color: var(--text-light);
}

.logout-btn {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

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

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

.stat-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-value.bonus {
    color: var(--primary-color);
}

/* Profile Section */
.profile-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-card);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.edit-toggle {
    color: var(--primary-color);
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Deals Table */
.deals-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.deals-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.deals-table th {
    text-align: left;
    padding: 16px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid rgba(0,0,0,0.05);
}

.deals-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 0.95rem;
}

.deals-table tr:last-child td {
    border-bottom: none;
}

.deal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.deal-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(0,0,0,0.05);
    color: var(--text-light);
}

.status-won {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.status-progress {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .logout-btn {
        width: 100%;
        text-align: center;
    }
    
    .glass-card {
        padding: 30px 20px;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-light);
    font-size: 0.85rem;
}

.contact-support {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-support a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
