/* Base Typography */
html, body {
    height: 100%;
    font-size: 0.9375rem; /* 15px */
    line-height: 1.5;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Typography Hierarchy */
h1, .h1 {
    font-size: 1.75rem;  /* 28px */
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
}

h2, .h2 {
    font-size: 1.5rem;   /* 24px */
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
}

h3, .h3 {
    font-size: 1.25rem;  /* 20px */
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}

h4, .h4 {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    line-height: 1.45;
    color: #1a1a1a;
}

/* Utility Text Classes */
.small-text {
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

.micro-text {
    font-size: 0.75rem;  /* 12px */
    line-height: 1.4;
}

.label {
    font-size: 0.8125rem; /* 13px */
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.01em;
}

.timestamp {
    font-size: 0.8125rem;
    color: #718096;
}

/* Base Layout */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #f8f9fa;
}

main {
    flex: 1 0 auto;
    padding: 2rem 0;
}

/* Links & Interactive Elements */
a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

.btn {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-link {
    font-size: 0.9375rem;
    _font-weight: 500;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    padding: 0.6rem 0;
}

.site-title {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.site-title:hover {
    text-decoration: none;
    color: #2563eb;
}

/* Footer */
.footer {
    background: #fff;
    padding: 0.8rem 0;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid #eaeaea;
    color: #666;
    font-size: 0.9rem;
}

/* Loading & Notifications */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1060;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1051;
}

/* Common Components */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: translateY(-1px);
}

/* Card Styles */
.card-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1a;
}

.card-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Form Styles */
.form-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 2rem;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

/* Modal Styles */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
}

/* Text Utilities */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-break {
    word-wrap: break-word;
    word-break: break-word;
}

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

/* Status Styles */
.status-text {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Message Styles */
.message-content {
    font-size: 1.10rem;
    line-height: 1.6;
}

.toast-message {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: 1.5rem;
    }

    h2, .h2 {
        font-size: 1.25rem;
    }

    h3, .h3 {
        font-size: 1.125rem;
    }

    body {
        font-size: 0.875rem;
    }

    .header .container .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header {
        margin-top: 0.5rem;
    }
}