/* Toolbox — shared styles | 2026-05-08 */

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --white: #fff;
    --text: #333;
    --text-muted: #666;
    --border: #ddd;
    --radius: 10px;
    --shadow: 0 10px 40px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(6px);
}

.brand {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-actions { display: flex; gap: 12px; align-items: center; }

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-link:hover { background: rgba(255,255,255,0.15); color: var(--white); }

.nav-link.logout {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
}

.nav-link.logout:hover { background: rgba(255,255,255,0.2); }

/* ── Main ── */
.main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

/* ── Card ── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 620px;
}

/* ── Homepage ── */
.page-title {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 8px;
    text-align: center;
}

.page-subtitle {
    color: rgba(255,255,255,0.75);
    text-align: center;
    margin-bottom: 32px;
    font-size: 15px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.tool-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
}

.tool-icon { font-size: 36px; }

.tool-card h3 { font-size: 17px; color: var(--text); }

.tool-card p { font-size: 13px; color: var(--text-muted); line-height: 1.5; flex: 1; }

.open-btn {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

/* ── Login ── */
.login-wrap {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 24px;
    color: var(--text);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* ── Forms ── */
.form-group { margin-bottom: 20px; }

label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 6px;
}

input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

input[type="password"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}

textarea {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    min-height: 200px;
    resize: vertical;
}

/* ── Buttons ── */
.btn {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background: var(--bg-gradient);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text);
}

.btn-secondary:hover { background: #e0e0e0; }

.button-group { display: flex; gap: 10px; margin-top: 24px; }
.button-group .btn { flex: 1; }

/* ── Alerts ── */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error { background: #fee; color: #c33; border-left: 4px solid #c33; }
.alert-success { background: #efe; color: #3a3; border-left: 4px solid #3a3; }

/* ── File Upload ── */
.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px dashed var(--primary);
    border-radius: 8px;
    cursor: pointer;
    background: #f8f9ff;
    color: var(--primary);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.file-upload-label:hover { background: var(--primary); color: var(--white); }

.file-name { color: #27ae60; font-size: 13px; margin-top: 8px; display: none; }

/* ── Divider ── */
.divider {
    text-align: center;
    color: #999;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: var(--white);
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

/* ── Info ── */
.info-box {
    background: #f0f8ff;
    padding: 12px;
    border-left: 4px solid var(--primary);
    color: var(--text);
    font-size: 12px;
    border-radius: 4px;
    margin-top: 12px;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
}

a.page-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.4);
    transition: background 0.2s, border-color 0.2s;
}

a.page-btn:hover        { background: rgba(255,255,255,0.35); border-color: rgba(255,255,255,0.7); }
a.page-btn.active       { background: #fff; color: var(--primary) !important; border-color: #fff; }

/* ── Footer ── */
.footer {
    text-align: center;
    padding: 16px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 500px) {
    .card { padding: 28px 20px; }
    .tools-grid { grid-template-columns: 1fr; }
    .navbar { padding: 12px 16px; }
}
