:root {
    /* Core Colors */
    --primary: #B39E75;
    --primary-hover: #C8B896;
    --primary-light: #2B3C42;
    --primary-glow: rgba(179, 158, 117, 0.25);
    
    --success: #B39E75;
    --success-hover: #C8B896;
    --success-glow: rgba(179, 158, 117, 0.25);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #26353B;
    --danger-glow: rgba(239, 68, 68, 0.25);
    
    /* Background & Surfaces */
    --bg-body: #1E2A2F;
    --bg-surface: #26353B;
    --bg-surface-hover: #2B3C42;
    
    /* Text Colors */
    --text-main: #F8FAFC;
    --text-muted: #C0A97E;
    --text-light: #A0AAB2;
    
    /* Borders */
    --border-light: #3A4F57;
    --border-focus: #B39E75;
    
    /* Shadows - Soft and modern */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    
    /* Metrics */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    background-color: #2B3C42;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px var(--primary-glow));
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-icon {
    width: 20px;
    height: 20px;
    color: inherit;
    transition: transform var(--transition-bounce);
}

.sidebar-nav a:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-main);
    transform: translateX(4px);
}

.sidebar-nav a:hover .nav-icon {
    transform: scale(1.1);
}

.sidebar-nav li.active a {
    background-color: var(--primary);
    color: #1E2A2F;
    font-weight: 600;
}

.sidebar-nav li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #F8FAFC;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* Background Watermark */
.main-content::before {
    content: "Unity Space By Kyaw";
    position: fixed;
    bottom: 30px;
    right: 40px;
    background-image: url('/static/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 55px; /* space for the logo */
    height: 40px;
    line-height: 40px;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(192, 169, 126, 0.25); /* Subtle gold text */
    pointer-events: none; /* Allows clicking through it */
    z-index: -1;
}

.main-header {
    background-color: var(--bg-surface);
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.main-header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--transition-bounce);
}

.user-profile .avatar:hover {
    transform: scale(1.05);
}

.user-profile .avatar svg {
    width: 20px;
    height: 20px;
}

.content-area {
    padding: 2.5rem;
    display: flex;
    justify-content: center; /* Center the card horizontally for a cleaner look */
    align-items: flex-start;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Action Card & Form */
.action-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card), var(--shadow-md);
    width: 100%;
    max-width: 600px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

/* Decorative top border for card */
.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #B39E75, #C8B896);
}

.card-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.account-form {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

/* Input Fields */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--text-light);
    pointer-events: none;
    transition: color var(--transition-base);
}

.input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--bg-body);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.input-wrapper input:hover {
    border-color: #cbd5e1;
    background-color: var(--bg-surface);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary);
}

/* Fix icon color targeting for input focus since icon is before input in DOM */
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

/* Select Dropdown Styling */
.input-wrapper select:hover {
    border-color: #cbd5e1;
    background-color: var(--bg-surface);
}

.input-wrapper select:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: var(--bg-surface);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-wrapper select option {
    background-color: var(--bg-body);
    color: var(--text-main);
    padding: 0.5rem;
}


/* Form Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-bounce);
    border: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* Primary / Success Button */
.btn-primary {
    background-color: var(--success);
    color: #1E2A2F;
    box-shadow: 0 2px 4px var(--success-glow);
}

.btn-primary:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--success-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--success-glow), 0 0 0 2px var(--bg-surface) inset;
}

/* Danger / Cancel Button */
.btn-danger {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger-light);
}

.btn-danger:hover {
    background-color: var(--danger-light);
    color: var(--danger-hover);
    border-color: var(--danger-hover);
}

.btn-danger:active {
    transform: scale(0.98);
}

.btn-danger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--danger-glow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    
    .sidebar-nav ul {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .sidebar-nav a {
        white-space: nowrap;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    .action-card {
        max-width: 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}
