/* ClubLinks — shared stylesheet */

:root{
    --bg: #0b1120;
    --surface: #161f36;
    --surface2: #223050;
    --border: #2a3854;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --dark: #05070d;
    --dark-hover: #1f2937;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --radius: 14px;
    --shadow: 0 12px 32px rgba(0,0,0,.35);
}

*{
    box-sizing: border-box;
}

body{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top, #101b34 0%, var(--bg) 55%);
    color: var(--text);
    margin: 0;
    padding: 30px 16px 60px;
    min-height: 100vh;
}

h2{
    margin: 0 0 4px;
    font-size: 1.4rem;
}

h2 + p{
    color: var(--muted);
    margin-top: 0;
}

a{
    color: var(--primary);
}

.container{
    max-width: 760px;
    margin: 20px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 26px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.container-wide{
    max-width: 1050px;
}

/* Navbar ------------------------------------------------------------- */

.navbar{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
}

.nav-tabs{
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}

.nav-tabs a{
    padding: 8px 16px;
    border-radius: 7px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color .15s ease, color .15s ease;
}

.nav-tabs a:hover{
    color: var(--text);
    background: var(--surface2);
}

.nav-tabs a.active{
    background: var(--primary);
    color: white;
}

.navbar-group{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

/* Buttons -------------------------------------------------------------- */

.button, button{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}

.button:hover, button:hover{
    background: var(--primary-hover);
}

.button:active, button:active{
    transform: translateY(1px);
}

.button-dark{
    background: var(--dark);
}

.button-dark:hover{
    background: var(--dark-hover);
}

.button-danger{
    background: var(--danger);
}

.button-danger:hover{
    background: var(--danger-hover);
}

table button{
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Forms ------------------------------------------------------------------ */

label{
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--muted);
}

input, textarea, select{
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, textarea:focus, select:focus{
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .25);
}

input[type="file"]{
    padding: 8px;
}

textarea{
    height: 90px;
    resize: vertical;
}

.color-row{
    display: flex;
    gap: 10px;
}

.color-row input[type="text"]{
    flex: 1;
}

.color-row input[type="color"]{
    width: 54px;
    padding: 4px;
    flex-shrink: 0;
}

.invalid{
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .2) !important;
}

.valid{
    border-color: var(--success) !important;
}

.badge{
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-warning{
    background: rgba(245, 158, 11, .15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, .4);
}

.badge-muted{
    background: rgba(148, 163, 184, .12);
    color: var(--muted);
    border: 1px solid var(--border);
}

/* Misc blocks ------------------------------------------------------------ */

.url{
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    word-break: break-all;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.85rem;
    color: var(--muted);
}

.actions{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

/* Tables ------------------------------------------------------------------ */

.table-scroll{
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 10px;
}

table{
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 10px;
}

.table-scroll table{
    margin-top: 0;
}

th, td{
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td.actions-cell{
    white-space: nowrap;
}

.row-actions{
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

th{
    background: var(--bg);
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

tr:hover td{
    background: var(--surface2);
}

td.url{
    background: none;
    font-size: 0.82rem;
}

/* Responsive --------------------------------------------------------------- */

@media (max-width: 600px){
    .container{
        padding: 18px;
    }

    .navbar{
        padding: 12px 16px;
    }
}
