/* Rimesoft Core Design System
 *
 * Shared tokens and base components for all apps.
 * App-specific themes should build on top of these variables/classes.
 */

:root {
    /* Color palette */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --border-color: #e2e8f0;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgb(15 23 42 / 0.08);
    --shadow-md: 0 4px 6px -1px rgb(15 23 42 / 0.15);
    --shadow-lg: 0 10px 25px -5px rgb(15 23 42 / 0.35);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Spacing scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
}

/* Base reset / typography – intentionally minimal to avoid surprises */

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
        "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Layout primitives */

.rs-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rs-page-main {
    flex: 1 0 auto;
}

.rs-page-footer {
    flex-shrink: 0;
}

.rs-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (max-width: 576px) {
    .rs-container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
    }
}

.rs-section {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

/* Cards */

.rs-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rs-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.rs-card-header {
    margin-bottom: var(--space-4);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.rs-card-subtitle {
    margin-top: var(--space-1);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Buttons */

.rs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.55rem 1.2rem;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.2;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
    text-decoration: none;
}

.rs-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}

.rs-btn-primary:hover {
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.rs-btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.35);
}

.rs-btn-outline:hover {
    background-color: rgba(37, 99, 235, 0.06);
    border-color: rgba(37, 99, 235, 0.6);
}

.rs-btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.rs-btn-ghost:hover {
    background-color: rgba(148, 163, 184, 0.12);
    color: var(--text-primary);
}

/* Inputs */

.rs-input,
.rs-select,
.rs-textarea {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    background-color: #ffffff;
}

.rs-input:focus,
.rs-select:focus,
.rs-textarea:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.rs-label {
    display: inline-block;
    margin-bottom: var(--space-1);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.rs-help-text {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Utility text colors */

.rs-text-muted {
    color: var(--text-muted);
}

.rs-text-secondary {
    color: var(--text-secondary);
}

/* Simple tag/chip */

.rs-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: rgba(37, 99, 235, 0.06);
    color: var(--primary-color);
}

