/* assets/style.css */
:root {
    --primary: #00bad1;
    --primary-dark: #0097aa;
    --secondary: #0a4179;
    --secondary-light: #155a9c;
    --bg-color: #f4f7f9;
    --surface: #ffffff;
    --text-main: #0a4179;
    --text-light: #718096;
    --success: #2ecc71;
    --error: #e74c3c;
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(10, 65, 121, 0.08);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    direction: rtl;
    /* RTL Support */
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.btn {
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 186, 209, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 186, 209, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-block {
    width: 100%;
}

/* Google Button */
.btn-google {
    background-color: white;
    color: #757575;
    border: 1px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-family: 'Roboto', 'Cairo', sans-serif;
    width: 100%;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-google:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.btn-google img {
    width: 20px;
    height: 20px;
    display: block;
    /* Removes inline spacing */
    margin: 0;
}

/* Top Header (Profile & Admin) */
.top-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header .logo {
    display: flex;
    align-items: center;
}

.site-logo {
    height: auto;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.top-header .logo img.site-logo {
    height: 80px;
    /* Extra large for header visibility */
}

.modal-content .site-logo {
    height: 150px;
    /* Extra large for login modal prominence */
    margin-bottom: 40px;
}

.top-header .header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-header .header-actions a {
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
}

.top-header .header-actions a:hover {
    transform: scale(1.1);
}

/* Bottom Navigation Bar (Mobile-Optimized) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 70px;
    position: relative;
}

.bottom-nav .nav-item .material-icons {
    font-size: 24px;
    margin-bottom: 4px;
}

.bottom-nav .nav-item .nav-label {
    font-size: 11px;
    font-weight: 500;
}

.bottom-nav .nav-item.active {
    color: var(--primary);
    background: rgba(0, 186, 209, 0.1);
}

.bottom-nav .nav-item:active {
    transform: scale(0.95);
}

/* Main Content Spacing */
#main-content {
    margin-top: 120px;
    margin-bottom: 80px;
    min-height: calc(100vh - 200px);
}

.nav-links a.active,
.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

/* Cards (Polls) */
.card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.card h3 {
    margin-top: 0;
    font-size: 18px;
    line-height: 1.5;
}

.meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

/* Poll Options */
.poll-options {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
}

.poll-option.selected {
    border-color: var(--primary);
    background-color: rgba(0, 186, 209, 0.05);
}

.poll-option:hover {
    border-color: var(--primary);
}

.poll-option .label {
    position: relative;
    z-index: 2;
    font-weight: 600;
}

.poll-option .bar {
    position: absolute;
    top: 0;
    right: 0;
    /* RTL fill */
    bottom: 0;
    background-color: rgba(0, 186, 209, 0.15);
    z-index: 1;
    width: 0%;
    transition: width 1s ease-out;
}

.poll-option .percentage {
    float: left;
    /* moves to left end in RTL */
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    z-index: 2;
    position: relative;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 65, 121, 0.4);
    display: none;
    /* Flex when shown */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Floating Action Button (if needed) */
.fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* Left for RTL comfort usually? Or should follow natural thumb? Left is standard for RTL FABs typically. */
    background: var(--primary);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 186, 209, 0.4);
    text-decoration: none;
}

/* Profile & Suggestions List */
.suggestions-wrapper {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.suggestions-wrapper h3 {
    margin-bottom: 20px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestions-list {
    max-height: 400px;
    overflow-y: auto;
    padding-left: 5px;
}

/* Scrollbar styling */
.suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.suggestions-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.suggestion-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    text-align: right;
}

.suggestion-item h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: var(--secondary);
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.suggestion-options {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.suggestion-options li {
    display: flex;
    align-items: center;
    gap: 5px;
}

.suggestion-options li::before {
    content: "•";
    color: var(--primary);
}

.clickable-poll-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-poll-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* Admin Summary Stats */
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.stat-card .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}