/* DESH Platform - Main Stylesheet */
/* Design for Environment and Sustainable Habitats */

:root {
    --primary: #2E7D32;
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary: #81C784;
    --accent: #FF9800;
    
    --leaf-green: #4CAF50;
    --leaf-yellow: #FFC107;
    --leaf-orange: #FF9800;
    --leaf-brown: #8D6E63;
    --leaf-none: #9E9E9E;
    
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --text-dark: #212121;
    --text-medium: #616161;
    --text-light: #9E9E9E;
    --border: #E0E0E0;
    
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header & Navigation */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
}

.logo-text span {
    font-size: 0.85rem;
    opacity: 0.9;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.user-info .name {
    font-weight: 600;
}

.user-info .role {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: capitalize;
}

.nav {
    background: rgba(0,0,0,0.1);
    padding: 0 2rem;
}

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

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    display: block;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: all 0.3s;
}

.nav a:hover, .nav a.active {
    background: var(--bg-light);
    color: var(--primary-dark);
}

/* Main Content */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-medium);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.25rem;
    color: var(--text-dark);
}

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

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.green { background: #E8F5E9; color: var(--leaf-green); }
.stat-icon.blue { background: #E3F2FD; color: #1976D2; }
.stat-icon.orange { background: #FFF3E0; color: var(--leaf-orange); }
.stat-icon.purple { background: #F3E5F5; color: #7B1FA2; }

.stat-content h3 {
    font-size: 2rem;
    color: var(--text-dark);
}

.stat-content p {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* Leaf Rating Display */
.leaf-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
    border-radius: var(--radius-lg);
}

.leaf-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.leaf-icon.green { color: var(--leaf-green); }
.leaf-icon.yellow { color: var(--leaf-yellow); }
.leaf-icon.orange { color: var(--leaf-orange); }
.leaf-icon.brown { color: var(--leaf-brown); }
.leaf-icon.none { color: var(--leaf-none); }

.leaf-label {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.leaf-percentage {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Progress Bar */
.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    height: 30px;
    background: #E0E0E0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 1rem;
    color: white;
    font-weight: 600;
}

.progress-fill.brown { background: linear-gradient(90deg, #6D4C41, var(--leaf-brown)); }
.progress-fill.orange { background: linear-gradient(90deg, #E65100, var(--leaf-orange)); }
.progress-fill.yellow { background: linear-gradient(90deg, #F57F17, var(--leaf-yellow)); }
.progress-fill.green { background: linear-gradient(90deg, var(--primary), var(--leaf-green)); }

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-medium);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success {
    background: var(--leaf-green);
    color: white;
}

.btn-danger {
    background: #F44336;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.table tr:hover {
    background: rgba(46, 125, 50, 0.05);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-design { background: #E3F2FD; color: #1565C0; }
.badge-construction { background: #FFF3E0; color: #E65100; }
.badge-occupancy { background: #F3E5F5; color: #7B1FA2; }
.badge-certified { background: #E8F5E9; color: var(--primary-dark); }

.badge-leaf-green { background: #E8F5E9; color: var(--leaf-green); }
.badge-leaf-yellow { background: #FFFDE7; color: #F57F17; }
.badge-leaf-orange { background: #FFF3E0; color: var(--leaf-orange); }
.badge-leaf-brown { background: #EFEBE9; color: var(--leaf-brown); }

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}

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

.login-logo h1 {
    color: var(--primary-dark);
    font-size: 2rem;
}

.login-logo p {
    color: var(--text-medium);
}

/* Stage Timeline */
.stage-timeline {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.stage-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border);
    z-index: 0;
}

.stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.stage-dot {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-white);
    border: 4px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.stage-item.active .stage-dot {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.stage-item.completed .stage-dot {
    border-color: var(--leaf-green);
    background: var(--leaf-green);
    color: white;
}

.stage-label {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* Score Cards */
.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.score-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
}

.score-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-top: 0.25rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #E8F5E9;
    color: var(--primary-dark);
    border-left: 4px solid var(--leaf-green);
}

.alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid var(--accent);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-wrap: wrap;
    }
    
    .header-top {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center { text-center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }
