/* ==========================================================================
   Sentiom Centralized Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
    --color-primary: #343fd5;
    --color-primary-hover: #2a32ab;
    --color-danger: #dc3545;
    --color-danger-hover: #c82333;
    --color-success: #28a745;
    --color-text: #333;
    --color-text-muted: #666;
    --color-bg: #fafafa;
    --color-bg-card: white;
    --color-border: #ddd;
    --color-border-light: #eee;
    --font-family: 'Inter', system-ui, sans-serif;
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-button: 0 4px 12px rgba(52, 63, 213, 0.3);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
body {
    font-family: var(--font-family);
    margin: 0;
    background: var(--color-bg);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="email"],
input[type="password"] {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}

select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23050505' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 1rem center;
    color: #050505;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:hover {
    border-color: var(--color-primary);
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(52, 63, 213, 0.12);
}

/* --------------------------------------------------------------------------
   Button System
   -------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
    text-decoration: none;
}

/* Primary Button - Filled blue with lift+shadow on hover */
.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-button);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 63, 213, 0.2);
}

/* Secondary Button - Outlined, fills on hover, NO animation */
.btn-secondary {
    padding: calc(0.65rem - 1.5px) calc(1.25rem - 1.5px);
    font-size: 0.9rem;
    background: white;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background: rgba(52, 63, 213, 0.85);
    color: white;
}

/* Tertiary Button - Text style, bold */
.btn-tertiary {
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.btn-tertiary:hover {
    text-decoration: underline;
}

/* Quaternary Button - Text style, normal weight */
.btn-quaternary {
    background: transparent;
    color: var(--color-primary);
    font-weight: 400;
    padding: 0.5rem 1rem;
}

.btn-quaternary:hover {
    text-decoration: underline;
}

/* Danger Button - Text style like tertiary, but red */
.btn-danger {
    background: transparent;
    color: var(--color-danger);
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.btn-danger:hover {
    text-decoration: underline;
}

.btn-danger:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Danger Prominent Button - Soft red background, fills on hover */
.btn-danger-prominent {
    background: #fee2e5;
    color: var(--color-danger);
    font-weight: 600;
}

.btn-danger-prominent:hover {
    background: var(--color-danger);
    color: white;
}

.btn-danger-prominent:disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

/* Small button variant */
.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
    display: flex;
    gap: 1rem;
}

.nav a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.nav a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Layout Components
   -------------------------------------------------------------------------- */
.page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.container {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.header {
    background: var(--color-bg-card);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

.header h1 {
    margin: 0 0 1rem 0;
}

/* --------------------------------------------------------------------------
   Cards & Sections
   -------------------------------------------------------------------------- */
.card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #f8f9fa;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

.form-row {
    display: flex;
    gap: 1rem;
}

/* --------------------------------------------------------------------------
   Messages & Alerts
   -------------------------------------------------------------------------- */
.message {
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.message-success {
    background: #d4edda;
    color: #155724;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
}

/* --------------------------------------------------------------------------
   Download Button - Animated with icon reveal
   -------------------------------------------------------------------------- */
.btn-download {
    --btn-width: 160px;
    --btn-height: 42px;
    --tooltip-height: 35px;
    --tooltip-width: 100px;
    --gap-between-tooltip-to-button: 18px;
    width: var(--btn-width);
    height: var(--btn-height);
    background: var(--color-primary);
    position: relative;
    text-align: center;
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    transition: background 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn-download::before {
    position: absolute;
    content: attr(data-tooltip);
    width: var(--tooltip-width);
    height: var(--tooltip-height);
    background-color: white;
    font-size: 0.85rem;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    line-height: var(--tooltip-height);
    bottom: calc(var(--btn-height) + var(--gap-between-tooltip-to-button) + 10px);
    left: calc(50% - var(--tooltip-width) / 2);
    box-shadow: var(--shadow-card);
}

.btn-download::after {
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: white;
    left: calc(50% - 10px);
    bottom: calc(100% + var(--gap-between-tooltip-to-button) - 10px);
}

.btn-download::after,
.btn-download::before {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s;
}

.btn-download .btn-download-wrapper,
.btn-download .btn-download-text,
.btn-download .btn-download-icon {
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    color: white;
}

.btn-download .btn-download-text {
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    font-weight: 600;
    font-size: 0.95rem;
    transition: top 0.5s;
}

.btn-download .btn-download-icon {
    top: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: top 0.5s;
}

.btn-download .btn-download-icon svg {
    width: 24px;
    height: 24px;
}

.btn-download:hover {
    background: var(--color-primary-hover);
    text-decoration: none;
}

.btn-download:hover .btn-download-text {
    top: -100%;
}

.btn-download:hover .btn-download-icon {
    top: 0;
}

.btn-download:hover::before,
.btn-download:hover::after {
    opacity: 1;
    visibility: visible;
}

.btn-download:hover::after {
    bottom: calc(var(--btn-height) + var(--gap-between-tooltip-to-button) - 20px);
}

.btn-download:hover::before {
    bottom: calc(var(--btn-height) + var(--gap-between-tooltip-to-button));
}

/* --------------------------------------------------------------------------
   Footer Logo
   -------------------------------------------------------------------------- */
.footer-logo {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

.footer-logo img {
    max-width: 150px;
    opacity: 0.7;
}
