/* CODEDTECHS Vote System - Custom Styles */

:root {
    /* Warm, calm theme */
    --primary-color: #2f6e63; /* warm teal */
    --primary-color-dark: #275e55;
    --primary-color-light: #3a8275;

    --secondary-color: #8a959f; /* soft neutral */
    --success-color: #2e7d32;
    --danger-color: #c0392b;
    --warning-color: #e0a800;
    --info-color: #5bb1ad; /* softened */
    --dark-color: #1e2a27; /* deep greenish charcoal */
    --light-color: #faf8f6; /* warm off-white */
}

/* Navbar Logo */
.navbar-logo {
    height: 40px;
    width: auto;
    max-height: 40px;
    object-fit: contain;
    background: transparent;
    padding: 2px;
    border-radius: 4px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Ensure logo background doesn't show */
.navbar-brand {
    background: transparent !important;
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 32px;
        max-height: 32px;
    }
}

/* Login/Register Page Styles with Logo */
.login-page {
    min-height: calc(100vh - 56px);
    background: #f8f9fa;
    padding: 28px 15px; /* moved up */
}

/* Reduce extra top margin from bootstrap spacing on auth rows */
.login-page .row {
    margin-top: 8px !important;
}

/* Logo Container on Login/Register Pages */
.login-logo-container {
    display: inline-block;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.login-logo-container:hover {
    transform: translateY(-3px);
}

.login-logo {
    height: 130px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    background: transparent;
    display: block;
    transition: all 0.3s ease;
    animation: logoFloat 5s ease-in-out infinite;
}

.login-logo-container:hover .login-logo {
    transform: scale(1.08);
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
}

/* Gentle floating animation for logo */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.03); }
}

/* Card styling on login pages */
.login-page .card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.login-page .card-header {
    background: var(--primary-color);
    border: none;
    border-radius: 10px 10px 0 0;
}

/* Override Bootstrap primary to our theme */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-color-dark) !important;
    border-color: var(--primary-color-dark) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-logo {
        height: 80px;
        max-width: 200px;
    }
    
    .login-page {
        padding: 30px 15px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Custom Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    font-weight: 600;
}

/* Nominee Card */
.nominee-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.nominee-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
}

.nominee-card img {
    height: 200px;
    object-fit: cover;
}

.nominee-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
}

.stats-card.success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.stats-card.info {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.stats-card .icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Sidebar Styles */
.sidebar {
    min-height: calc(100vh - 56px);
    background: var(--dark-color);
    padding: 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: 0;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* Voting Interface */
.voting-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
}

.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-vote {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border: none;
    color: white;
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: rgba(13, 110, 253, 0.1);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Modals */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    border-radius: 15px 15px 0 0;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nominee-image {
        height: 200px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}

/* Dark Mode Toggle (Optional) */
.dark-mode {
    background-color: #1a1a1a;
    color: white;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* Vote Count Badge */
.vote-count {
    background: var(--success-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Status Badges */
.status-pending {
    background-color: var(--warning-color);
    color: #000;
}

.status-active {
    background-color: var(--success-color);
    color: white;
}

.status-closed {
    background-color: var(--secondary-color);
    color: white;
}

.status-suspended {
    background-color: var(--danger-color);
    color: white;
}

/* Institution Logo */
.institution-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

/* Pagination */
.pagination {
    justify-content: center;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    border: none;
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

/* Utility Classes */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rounded-lg {
    border-radius: 15px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


