/*
 * eUpload v2 – Modern clean design inspired by cloud storage UIs.
 *
 * Uses a light background with subtle shadows and rounded elements.  The
 * primary colour palette is a gradient of indigo and cyan.
 */

:root {
    --bg-page: #f5f6fa;
    --bg-panel: #ffffff;
    --bg-header: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #2b2b2b;
    --text-secondary: #666666;
    --primary: #4f46e5;
    --secondary: #06b6d4;
    --success: #14b8a6;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 8px;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
}

body.dark {
    /* Optional dark mode */
    --bg-page: #121926;
    --bg-panel: #1f2937;
    --bg-header: #1f2937;
    --border-color: #374151;
    --text-primary: #f5f5f5;
    --text-secondary: #a0aec0;
    --shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1.5rem;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}
.navbar .brand {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
}
.navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.nav-link {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}
.nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nav-user {
    font-weight: 500;
    color: var(--primary);
}

/* Containers and cards */
.container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--primary);
}

.panel table {
    width: 100%;
    border-collapse: collapse;
}
.panel table th,
.panel table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-size: 0.9rem;
}
.panel table th {
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
}
.panel table tr:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
}
.btn-primary:hover {
    box-shadow: var(--shadow-hover);
}
.btn-secondary {
    background: var(--bg-header);
    color: var(--primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-page);
    box-shadow: var(--shadow);
}
.btn-danger {
    background: var(--error);
    color: #fff;
}
.btn-danger:hover {
    box-shadow: var(--shadow-hover);
}

/* Forms */
label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-panel);
}
input[type="checkbox"], input[type="radio"] {
    margin-right: 0.5rem;
}
input[type="submit"] {
    margin-top: 0.5rem;
}

/* Flash messages */
.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.flash-info {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}
.flash-success {
    background: #d1fae5;
    color: #047857;
    border: 1px solid #6ee7b7;
}
.flash-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Tables actions */
.actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.actions form {
    display: inline;
}
.actions button {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
}
.actions button:hover {
    color: var(--secondary);
}

/* Rich text editor styles (for documents) */
.editor {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    min-height: 300px;
    padding: 1rem;
    background: var(--bg-panel);
    overflow-y: auto;
}

/* Utility */
.text-right {
    text-align: right;
}