/* ============================================================
   IUFRANZ - Dark Fantasy Theme
   Ragnarok Origin Guild Management System
   ============================================================ */

:root {
    --bg-dark: #0b0b10;
    --bg-card: #14141c;
    --bg-card-hover: #1a1a26;
    --bg-input: #0f0f16;
    --border: #2e2418;
    --border-gold: #c9a227;
    --gold: #c9a227;
    --gold-light: #e8c547;
    --gold-dark: #8a6d1a;
    --red: #8b1a1a;
    --red-bright: #c0392b;
    --purple: #4a1a6b;
    --text: #e8e0d0;
    --text-muted: #9a9080;
    --success: #2d6a2d;
    --warning: #8a6d1a;
    --danger: #8b1a1a;
    --info: #1a4a6b;
    --shadow-gold: 0 0 20px rgba(201, 162, 39, 0.15);
    --radius: 10px;
    --transition: 0.25s ease;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--gold-light);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ---------- Navbar ---------- */
.navbar-iufranz {
    background: linear-gradient(180deg, #12121a 0%, #0b0b10 100%);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

.navbar-brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold) !important;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(201,162,39,0.4);
}

.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--gold) !important;
    background: rgba(201,162,39,0.08);
}

.navbar-toggler {
    border-color: var(--border-gold);
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(201,162,39,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---------- Buttons ---------- */
.btn-gold {
    background: linear-gradient(135deg, #c9a227, #a67c00);
    border: none;
    color: #111;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all var(--transition);
    box-shadow: 0 4px 15px rgba(201,162,39,0.25);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #e8c547, #c9a227);
    color: #111;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(201,162,39,0.35);
}
.btn-gold:active {
    transform: translateY(0);
}

.btn-outline-gold {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    transition: all var(--transition);
}
.btn-outline-gold:hover {
    background: var(--gold);
    color: #111;
}

.btn-danger-custom {
    background: linear-gradient(135deg, #c0392b, #8b1a1a);
    border: none;
    color: #fff;
    font-weight: 600;
}
.btn-danger-custom:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

.btn-success-custom {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    border: none;
    color: #fff;
    font-weight: 600;
}
.btn-success-custom:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
}

/* ---------- Cards ---------- */
.card-iufranz {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-gold);
    transition: all var(--transition);
}
.card-iufranz:hover {
    border-color: rgba(201,162,39,0.4);
    box-shadow: 0 0 25px rgba(201,162,39,0.2);
}

.card-iufranz .card-header {
    background: linear-gradient(90deg, rgba(201,162,39,0.12), transparent);
    border-bottom: 1px solid var(--border);
    color: var(--gold) !important;
    font-weight: 700;
}

.card-iufranz .card-body {
    color: var(--text) !important;
}
.card-iufranz .card-body .text-muted {
    color: var(--text-muted) !important;
}
.card-iufranz strong {
    color: var(--text);
}

/* ---------- Hero ---------- */
.hero-section {
    position: relative;
    padding: 5rem 0 4rem;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74,26,107,0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139,26,26,0.2) 0%, transparent 45%),
        linear-gradient(180deg, #0f0f18 0%, #0b0b10 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(201,162,39,0.5), 0 0 60px rgba(201,162,39,0.2);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gold-light);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-desc {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* ---------- Feature Cards ---------- */
.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
    height: 100%;
}
.feature-card .icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(201,162,39,0.4);
}
.feature-card h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}
.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ---------- Forms ---------- */
.form-control, .form-select, textarea.form-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 8px;
    padding: 0.65rem 1rem;
}
.form-control:focus, .form-select:focus, textarea.form-control:focus {
    background: var(--bg-input) !important;
    border-color: var(--gold) !important;
    color: var(--text) !important;
    box-shadow: 0 0 0 0.2rem rgba(201,162,39,0.2);
}
.form-control::placeholder, textarea.form-control::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}
.form-label, label {
    color: var(--gold) !important;
    font-weight: 600;
    font-size: 0.9rem;
}
.form-check-label {
    color: var(--text) !important;
    font-weight: 500;
}
.form-text {
    color: var(--text-muted) !important;
}
.form-select option {
    background: var(--bg-card);
    color: var(--text);
}
input[type="datetime-local"],
input[type="date"],
input[type="number"],
input[type="file"] {
    color-scheme: dark;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: 8px;
    border: 1px solid transparent;
}
.alert-success {
    background: rgba(45,106,45,0.25);
    border-color: #2d6a2d;
    color: #a8e6a8;
}
.alert-danger {
    background: rgba(139,26,26,0.25);
    border-color: #8b1a1a;
    color: #e6a8a8;
}
.alert-warning {
    background: rgba(138,109,26,0.25);
    border-color: #8a6d1a;
    color: #e6d4a8;
}
.alert-info {
    background: rgba(26,74,107,0.25);
    border-color: #1a4a6b;
    color: #a8d4e6;
}

/* ---------- Tables ---------- */
.table-iufranz {
    color: var(--text) !important;
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-striped-bg: rgba(255,255,255,0.03);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: rgba(201,162,39,0.08);
    --bs-table-hover-color: var(--text);
}
.table-iufranz thead th {
    background: rgba(201,162,39,0.1);
    color: var(--gold) !important;
    border-bottom: 2px solid var(--border);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}
.table-iufranz td, .table-iufranz th {
    border-color: var(--border);
    vertical-align: middle;
    color: var(--text) !important;
}

/* Bootstrap overrides for dark theme readability */
.card, .card-body, .list-group-item {
    color: var(--text);
}
.modal-content {
    color: var(--text);
}
.page-link {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--gold);
}
.page-item.active .page-link {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
}
.page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    color: var(--gold-light);
}
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ---------- Badges ---------- */
.badge-status-pending { background: #8a6d1a; }
.badge-status-approved { background: #2d6a2d; }
.badge-status-denied { background: #8b1a1a; }
.badge-status-banned { background: #4a1a1a; }
.badge-role-admin { background: linear-gradient(135deg, #c9a227, #8a6d1a); color: #111; }
.badge-role-moderator { background: #4a1a6b; }
.badge-role-member { background: #1a4a6b; }

/* ---------- Footer ---------- */
.footer-iufranz {
    background: #0a0a0e;
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ---------- Sections ---------- */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

/* ---------- Auth pages ---------- */
.auth-wrapper {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}
.auth-card {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Announcement items ---------- */
.announcement-item {
    border-left: 3px solid var(--gold);
    padding: 1rem 1.25rem;
    background: rgba(201,162,39,0.05);
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}
.announcement-item h5 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}
.announcement-item .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Utility ---------- */
.glow-text {
    text-shadow: 0 0 15px rgba(201,162,39,0.5);
}

.divider-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 2rem 0;
    opacity: 0.4;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2.5rem;
    }
    .hero-title {
        letter-spacing: 2px;
    }
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* ---------- Dashboard sidebar (for later phases) ---------- */
.sidebar-iufranz {
    background: #101018;
    border-right: 1px solid var(--border);
    min-height: calc(100vh - 60px);
    padding: 1.25rem 0;
}
.sidebar-iufranz .nav-link {
    color: var(--text-muted);
    padding: 0.65rem 1.25rem;
    border-left: 3px solid transparent;
    transition: all var(--transition);
}
.sidebar-iufranz .nav-link:hover,
.sidebar-iufranz .nav-link.active {
    color: var(--gold);
    background: rgba(201,162,39,0.08);
    border-left-color: var(--gold);
}
.sidebar-iufranz .nav-section {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gold-dark);
    padding: 1rem 1.25rem 0.35rem;
    font-weight: 700;
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
    .sidebar-iufranz {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ============================================================
   Dashboard UI Enhancements
   ============================================================ */

.dash-coin-pill {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(201,162,39,0.25), rgba(201,162,39,0.1));
    border: 1px solid rgba(201,162,39,0.55);
    color: var(--gold-light);
    padding: 0.55rem 1.15rem;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 0 18px rgba(201,162,39,0.2);
}

.stat-card {
    background: #16161f;
    border: 1px solid rgba(201,162,39,0.28);
    border-radius: 12px;
    padding: 1.4rem 1rem 1.25rem;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #c9a227, transparent);
}
.stat-card:hover {
    border-color: rgba(201,162,39,0.55);
    box-shadow: 0 0 28px rgba(201,162,39,0.18);
    transform: translateY(-3px);
}
.stat-card-coins {
    background: linear-gradient(165deg, rgba(201,162,39,0.18) 0%, #16161f 55%);
    border-color: rgba(201,162,39,0.4);
}
.stat-icon {
    font-size: 1.35rem;
    color: #c9a227;
    margin-bottom: 0.4rem;
}
.stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: #e8c547;
    line-height: 1.15;
    text-shadow: 0 0 24px rgba(201,162,39,0.4);
}
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #9a9080;
    margin-top: 0.35rem;
    font-weight: 600;
}

.dash-panel {
    border-color: rgba(201,162,39,0.22) !important;
}
.dash-panel .card-header {
    background: linear-gradient(90deg, rgba(201,162,39,0.14), transparent) !important;
}
.dash-panel .card-body {
    min-height: 130px;
}

.dash-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 0.85rem;
    border-radius: 10px;
    background: #12121a;
    border: 1px solid rgba(201,162,39,0.15);
    margin-bottom: 0.65rem;
    transition: all 0.25s ease;
}
.dash-item:last-child { margin-bottom: 0; }
.dash-item:hover {
    background: rgba(201,162,39,0.08);
    border-color: rgba(201,162,39,0.35);
}

.dash-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.dash-item-icon.attendance {
    background: rgba(45,106,45,0.25);
    color: #7ddeb0;
    border: 1px solid rgba(45,140,45,0.4);
}
.dash-item-icon.raffle {
    background: rgba(201,162,39,0.18);
    color: #e8c547;
    border: 1px solid rgba(201,162,39,0.4);
}

.dash-item-body { flex: 1; min-width: 0; }
.dash-item-title {
    font-weight: 700;
    color: #e8e0d0;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-item-prize {
    color: #e8c547;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0.2rem 0;
}
.dash-item-meta {
    font-size: 0.78rem;
    color: #9a9080;
}

.dash-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9a9080;
    background: #12121a;
    border: 1px dashed rgba(201,162,39,0.2);
    border-radius: 10px;
}
.dash-empty i {
    font-size: 2rem;
    opacity: 0.55;
    margin-bottom: 0.6rem;
    display: block;
    color: #c9a227;
}
.dash-empty p {
    margin: 0;
    font-size: 0.92rem;
}

.ann-card {
    background: #12121a;
    border: 1px solid rgba(201,162,39,0.18);
    border-left: 3px solid #c9a227;
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.1rem;
    height: 100%;
    transition: all 0.25s ease;
}
.ann-card:hover {
    background: rgba(201,162,39,0.07);
    border-color: rgba(201,162,39,0.35);
    border-left-color: #e8c547;
}
.ann-card-title {
    font-weight: 700;
    color: #e8c547;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}
.ann-card-meta {
    font-size: 0.76rem;
    color: #9a9080;
    margin-bottom: 0.45rem;
}
.ann-card-text {
    font-size: 0.88rem;
    color: #b8b0a0;
    line-height: 1.5;
}

@media (max-width: 575.98px) {
    .dash-item { flex-wrap: wrap; }
    .dash-item form { width: 100%; margin-top: 0.4rem !important; }
    .dash-item form .btn { width: 100%; }
    .stat-value { font-size: 1.7rem; }
}