/* ========================================
   NORMA - Notulensi Rapat Madrasah
   CSS Stylesheet with Dark Green Theme
======================================== */

/* CSS Variables */
:root {
    --primary-color: #2d5016;
    --primary-light: #3d6b1f;
    --primary-dark: #1d3a0f;
    --secondary-color: #4a7c2c;
    --accent-color: #6ba83e;
    --gradient-start: #2d5016;
    --gradient-end: #4a7c2c;
    
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --text-white: #ffffff;
    
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    
    --border-color: #dee2e6;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --sidebar-width: 260px;
    --navbar-height: 60px;
    
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition);
}

/* ========================================
   LANDING PAGE STYLES
======================================== */

.landing-page {
    background: var(--bg-light);
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.landing-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--navbar-height);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.btn-login {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-white) !important;
    padding: 10px 24px !important;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 100px 20px 50px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-white);
    max-width: 800px;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-description {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: var(--bg-white);
}

.features-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 36px;
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: var(--bg-light);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
}

.stat-item i {
    font-size: 24px;
}

.about-image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 120px;
}

/* Footer */
.landing-footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding: 30px 20px;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* ========================================
   AUTH PAGE STYLES
======================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-box {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 40px;
}

.auth-header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.auth-header p {
    color: var(--text-light);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer a {
    color: var(--text-light);
}

.auth-footer a:hover {
    color: var(--primary-color);
}

/* ========================================
   DASHBOARD LAYOUT
======================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    font-size: 24px;
    color: var(--primary-color);
    padding: 8px;
}

.sidebar-toggle:hover {
    background: var(--bg-light);
    border-radius: 6px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--bg-light);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    color: var(--text-dark);
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
    text-transform: capitalize;
}

.user-avatar {
    font-size: 32px;
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--navbar-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--gradient-start), var(--gradient-end));
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 998;
    overflow-y: auto;
}

.sidebar.collapsed {
    left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.nav-item a i {
    font-size: 18px;
    width: 24px;
}

.nav-item a:hover,
.nav-item.active a {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--navbar-height);
    padding: 30px;
    min-height: calc(100vh - var(--navbar-height));
    transition: var(--transition);
    width: calc(100% - var(--sidebar-width));
}

.sidebar.collapsed ~ .main-content {
    margin-left: 0;
    width: 100%;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   COMMON COMPONENTS
======================================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.btn-success {
    background: #28a745;
    color: var(--text-white);
}

.btn-danger {
    background: #dc3545;
    color: var(--text-white);
}

.btn-warning {
    background: #ffc107;
    color: var(--text-dark);
}

.btn-info {
    background: #17a2b8;
    color: var(--text-white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.password-input-group {
    position: relative;
}

.password-input-group .form-control {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    padding: 5px 10px;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-dismissible {
    position: relative;
    padding-right: 45px;
}

.alert-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: inherit;
    opacity: 0.7;
    padding: 5px 10px;
}

.alert-close:hover {
    opacity: 1;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-white);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 20px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-white);
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background: var(--bg-light);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

.stat-info h3 {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* ========================================
   RESPONSIVE STYLES
======================================== */

@media (max-width: 1024px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 22px;
    }
    
    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .user-info {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .auth-box {
        padding: 25px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
        width: 100%;
    }
}
