/* Katha - Main Stylesheet */
:root {
    /* Light theme variables */
    --primary-color: #4e73df;
    --primary-dark: #3a5ac2;
    --secondary-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
    --text-color: #333;
    --bg-color: #eef2f8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --white: #ffffff;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.9);
    --input-border: #e0e5ec;
    --header-bg: linear-gradient(135deg, #4e73df, #3a5ac2);
    --footer-bg: #f5f5f5;
    --footer-color: #666;
    --credit-color: var(--danger-color);
    --payment-color: var(--secondary-color);
}

[data-theme="dark"] {
    /* Dark theme variables */
    --primary-color: #6384e4;
    --primary-dark: #4e6ac2;
    --secondary-color: #2fdba3;
    --text-color: #e5e5e5;
    --bg-color: #121212;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    --white: #1e1e1e;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --card-bg: rgba(45, 45, 45, 0.8);
    --input-border: #444;
    --header-bg: linear-gradient(135deg, #3a5ac2, #304272);
    --footer-bg: #1a1a1a;
    --footer-color: #999;
    --credit-color: #ff6b6b;
    --payment-color: #4ecdc4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background: linear-gradient(
        -45deg, 
        rgba(78, 115, 223, 0.15) 0%, 
        rgba(78, 115, 223, 0.08) 25%, 
        rgba(28, 200, 138, 0.08) 50%, 
        rgba(78, 115, 223, 0.08) 75%, 
        rgba(78, 115, 223, 0.15) 100%
    );
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    z-index: -1;
}

[data-theme="dark"] .animated-bg::before {
    background: linear-gradient(
        -45deg, 
        rgba(78, 115, 223, 0.15) 0%, 
        rgba(78, 115, 223, 0.05) 25%, 
        rgba(28, 200, 138, 0.05) 50%, 
        rgba(78, 115, 223, 0.05) 75%, 
        rgba(78, 115, 223, 0.15) 100%
    );
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: 1140px;
}

/* Theme toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background: var(--primary-color);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

.theme-toggle i {
    font-size: 1.4rem;
    color: white;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 2rem;
    position: fixed;
    z-index: 1;
    width: 100%;
    top: 0;
    border-bottom: solid 1px var(--primary-color);
    opacity: 0.9;
    background-color: var(--white);
    box-shadow: var(--shadow);
}

.navbar ul {
    display: flex;
    list-style: none;
}

.navbar a {
    color: var(--dark-color);
    padding: 0.45rem;
    margin: 0 0.25rem;
    text-decoration: none;
}

.navbar a:hover {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    padding: 2rem;
    margin-top: 60px;
}

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

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--card-bg);
    background-clip: padding-box;
    border: 1px solid var(--input-border);
    border-radius: 0.25rem;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    width: 100%;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

[data-theme="dark"] .secondary-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

[data-theme="dark"] .secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Card Styles */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--card-bg);
    background-clip: border-box;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

/* Flash Messages */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--input-border);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--input-border);
    background-color: rgba(0,0,0,.03);
}

/* Login and Register Forms */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Dashboard Widgets */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.25rem;
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 1rem;
    color: var(--text-color);
}

/* QR Code Display */
.qr-container {
    text-align: center;
    margin: 2rem 0;
}

.qr-image {
    max-width: 250px;
    border: 1px solid var(--input-border);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: white;
}

/* Header and Footer */
.header {
    background: var(--header-bg);
    color: white;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
}

.header h1 {
    margin: 0;
    padding: 0 1rem;
    font-weight: 700;
}

.header .nav-links {
    padding: 0 1rem;
}

.header .nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
}

.header .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.header .nav-links .logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer {
    background-color: var(--footer-bg);
    color: var(--footer-color);
    padding: 1rem 0;
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
}

/* Form elements */
.form-input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border 0.3s, box-shadow 0.3s;
    background-color: var(--white);
    color: var(--text-color);
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.25);
}

/* Flash messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 14px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
}

.flash-message.success {
    background-color: rgba(28, 200, 138, 0.2);
    color: #155724;
    border-left: 4px solid var(--secondary-color);
}

.flash-message.error {
    background-color: rgba(231, 74, 59, 0.2);
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

.flash-message.warning {
    background-color: rgba(246, 194, 62, 0.2);
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

/* Registration and Login specific */
.register-container, .login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 430px;
    overflow: hidden;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-selector {
    display: flex;
    border-bottom: 1px solid var(--input-border);
}

.tab-option {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-option.active {
    background-color: var(--primary-color);
    color: white;
}

.tab-content {
    padding: 30px;
}

.user-type-display {
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    text-align: center;
    font-weight: 600;
}

[data-theme="dark"] .user-type-display {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Credentials card */
.credentials-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 100%;
    max-width: 430px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.credentials-card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    text-align: center;
    color: var(--primary-color);
    font-weight: 700;
}

.credential-group {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--input-border);
}

.credential-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.credential-type {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.credential-details {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .header h1 {
        margin-bottom: 0.5rem;
    }
    
    .header .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .header .nav-links a {
        margin: 0.25rem;
    }
    
    .auth-card, 
    .credentials-card {
        max-width: 100%;
    }
    
    .navbar-collapse {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        padding-right: 50px;
    }
    
    .navbar-toggler {
        margin-right: 50px;
    }
    
    .theme-toggle {
        top: auto;
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
        z-index: 99;
    }
    
    .tab-content {
        padding: 20px;
    }
}

/* Add dark mode styles */
.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-mode .card {
    background-color: #1e1e1e;
    border-color: #333;
}

.dark-mode .navbar {
    background-color: #1a1a1a !important;
}

.dark-mode .table {
    color: #e0e0e0;
}

.dark-mode .btn-primary {
    background-color: #5c67de;
}

.dark-mode .text-dark {
    color: #e0e0e0 !important;
}

.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.dark-mode .navbar-light .navbar-brand,
.dark-mode .navbar-light .navbar-nav .nav-link {
    color: #e0e0e0;
}

.dark-mode .form-control {
    background-color: #333;
    border-color: #444;
    color: #e0e0e0;
} 