/* Custom COP30 Media Bucket Styles - FIXED VERSION */

/* Color Variables */
:root {
    --cop30-primary: #2c5530;
    --cop30-secondary: #4a7c59;
    --cop30-success: #28a745;
    --cop30-warning: #ffc107;
    --cop30-danger: #dc3545;
    --cop30-light: #f8f9fa;
    --cop30-dark: #343a40;
    --cop30-accent: #17a2b8;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Homepage Background */
.homepage-bg {
    background: linear-gradient(135deg, var(--cop30-primary) 0%, var(--cop30-secondary) 100%);
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    padding: 100px 0 80px;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.cop30-logo img {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Access Cards */
.access-options {
    margin-top: 50px;
}

.access-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    height: 100%;
}

.access-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.admin-card:hover {
    border-top: 4px solid var(--bs-primary);
}

.user-card:hover {
    border-top: 4px solid var(--bs-success);
}

/* Features Section */
.features-section {
    background: #f8f9fa;
}

.section-title {
    color: var(--cop30-primary);
    font-weight: bold;
    margin-bottom: 20px;
}

.feature-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

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

/* FIXED Login Pages Styles */
.login-page {
    background: linear-gradient(135deg, var(--cop30-primary) 0%, var(--cop30-secondary) 100%);
    min-height: 100vh;
    position: relative;
    /* REMOVED: display: flex; align-items: center; */
}

/* NEW: Login content wrapper */
.login-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px); /* Account for nav and footer */
    padding: 80px 0;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 500px;
    margin: auto;
    width: 100%;
}

.login-header {
    background: var(--cop30-primary);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-body {
    padding: 40px;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--cop30-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.25);
}

.btn-cop30-primary {
    background: var(--cop30-primary);
    border-color: var(--cop30-primary);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cop30-primary:hover {
    background: var(--cop30-secondary);
    border-color: var(--cop30-secondary);
    color: white;
    transform: translateY(-2px);
}

/* OTP Input */
.otp-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.otp-input {
    width: 50px;
    height: 50px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
}

.otp-input:focus {
    border-color: var(--cop30-primary);
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.25);
}

/* Dashboard Styles */
.dashboard-body {
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 100px;
}

.dashboard-sidebar {
    background: var(--cop30-primary);
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
}

.dashboard-main {
    margin-left: 250px;
    padding: 20px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: block;
    padding: 15px 25px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Data Tables */
.data-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.table-header {
    background: var(--cop30-light);
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background: var(--cop30-primary);
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px;
}

.table td {
    padding: 15px;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #f8f9fa;
}

/* Action Buttons */
.btn-action {
    padding: 5px 10px;
    margin: 2px;
    border-radius: 5px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.btn-edit {
    background: var(--cop30-accent);
    color: white;
}

.btn-delete {
    background: var(--cop30-danger);
    color: white;
}

.btn-ban {
    background: var(--cop30-warning);
    color: white;
}

.btn-unban {
    background: var(--cop30-success);
    color: white;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.image-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease;
}

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

.image-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-card-body {
    padding: 15px;
}

/* Bucket Tabs */
.bucket-tabs {
    margin-bottom: 30px;
}

.bucket-tabs .nav-link {
    color: var(--cop30-primary);
    border: 2px solid transparent;
    border-radius: 8px;
    margin-right: 10px;
    font-weight: 600;
}

.bucket-tabs .nav-link.active {
    background: var(--cop30-primary);
    color: white;
    border-color: var(--cop30-primary);
}

/* Form Styling */
.form-section {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.form-section h4 {
    color: var(--cop30-primary);
    margin-bottom: 25px;
    font-weight: 600;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--cop30-primary);
}

/* FIXED Footer Styles */
.footer {
    background: var(--cop30-dark);
    color: #ffffff;
    padding: 40px 0 20px;
    position: relative;
    bottom: 0;
    width: 100%;
    /* REMOVED: margin-top: 50px; to prevent extra spacing */
}

.footer a {
    color: #ffffff;
    text-decoration: none;
}

.footer a:hover {
    color: var(--cop30-accent);
}

/* Navigation */
.navbar-cop30 {
    background: var(--cop30-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-cop30 .navbar-brand,
.navbar-cop30 .nav-link {
    color: white !important;
}

.navbar-cop30 .nav-link:hover {
    color: var(--cop30-accent) !important;
}

/* Utilities */
.text-cop30-primary {
    color: var(--cop30-primary) !important;
}

.bg-cop30-primary {
    background-color: var(--cop30-primary) !important;
}

.border-cop30-primary {
    border-color: var(--cop30-primary) !important;
}

/* FIXED Responsive Design */
@media (max-width: 768px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .dashboard-sidebar.show {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
    }
    
    .otp-container {
        gap: 10px;
    }
    
    .otp-input {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    /* FIXED: Login pages mobile responsiveness */
    .login-content-wrapper {
        padding: 40px 15px;
        min-height: calc(100vh - 120px);
    }
    
    .login-container {
        margin: 0 15px;
    }
}