/* Global application styles */

/* IBM Plex Sans Arabic - Self-hosted */
@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-300-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-300-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-400-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-500-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-600-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-700-arabic.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
    font-family: 'IBM Plex Sans Arabic';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/IBMPlexSansArabic-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --rz-text-font-family: 'IBM Plex Sans Arabic', sans-serif;
    --app-page-gap: 1.5rem;
    --app-surface-radius: 14px;
    --app-surface-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    --app-surface-shadow-hover: 0 14px 32px rgba(15, 23, 42, 0.12);
}

html, body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.app-page {
    gap: var(--app-page-gap);
}

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

.app-page__title {
    font-weight: 700;
    margin: 0;
}

.app-page__subtitle {
    color: var(--rz-text-secondary-color);
    margin: 0 auto;
    max-width: 44rem;
}

.app-surface {
    border: 1px solid var(--rz-border-color);
    border-radius: var(--app-surface-radius);
    box-shadow: var(--app-surface-shadow);
}

.app-stat-card {
    border-bottom-width: 3px;
    border-bottom-style: solid;
    min-height: 100%;
}

.app-stat-card--primary {
    border-bottom-color: var(--rz-primary);
}

.app-stat-card--success {
    border-bottom-color: var(--rz-success);
}

.app-stat-card--warning {
    border-bottom-color: var(--rz-warning);
}

.app-stat-card--danger {
    border-bottom-color: var(--rz-danger);
}

.app-stat-card__value {
    font-weight: 700;
}

.app-toolbar-card {
    padding: 1rem 1.25rem;
}

.app-toolbar-note {
    color: var(--rz-text-secondary-color);
    margin: 0;
}

.app-filter-input {
    min-width: 150px;
    width: 100%;
}

.app-data-card {
    overflow: hidden;
    padding: 0;
}

.app-data-grid {
    border: 0;
}

.app-section-card {
    padding: 1.25rem;
}

.app-section-card__title {
    font-weight: 600;
    margin: 0;
}

.app-quick-link {
    cursor: pointer;
    min-height: 132px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-quick-link:hover {
    box-shadow: var(--app-surface-shadow-hover);
    transform: translateY(-2px);
}

.app-list-card {
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-list-card:hover {
    box-shadow: var(--app-surface-shadow-hover);
    transform: translateY(-2px);
}

.app-detail-metrics {
    color: var(--rz-text-secondary-color);
}

.app-inline-form {
    gap: 1rem;
}

.app-inline-form .rz-form-field {
    min-width: 180px;
}

.app-dialog {
    gap: 0.75rem;
}

.app-dialog .rz-form-field,
.app-dialog .rz-textbox,
.app-dialog .rz-dropdown,
.app-dialog .rz-numeric,
.app-dialog .rz-datepicker,
.app-dialog .rz-textarea {
    width: 100%;
}

/* Modal form label styling */
.modal-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Modal action button row */
.modal-actions {
    flex-shrink: 0;
    padding-top: 1rem;
}

/* Modal action button */
.modal-btn {
    width: 100%;
    font-size: 0.9rem;
}

/* Empty state card */
.empty-state-card {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--rz-border-color);
    border-radius: 12px;
}

/* Validation error message */
.field-validation-error {
    color: var(--rz-danger);
    font-size: 12px;
    margin-top: 4px;
}

/* Image upload input */
.image-upload-input {
    width: 100%;
    padding: 6px;
    border: 1px solid var(--rz-border-color);
    border-radius: 4px;
}

@media (max-width: 767.98px) {
    .app-toolbar-card {
        padding: 1rem;
    }

    .app-inline-form .rz-form-field {
        min-width: 100%;
    }

    .app-page__subtitle {
        max-width: none;
    }
}
