/* Components CSS - Forms, Cards, Buttons, etc. */

/* === FORMS === */

/* Form Container */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e9ef;
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: #212a34;
    font-style: italic;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 14px;
    color: #6e7884;
    font-style: italic;
}

/* Form Sections */
.form-section {
    margin-bottom: 32px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #212a34;
    font-style: italic;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e9ef;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #212a34;
    margin-bottom: 8px;
    font-style: italic;
}

.form-label.required::after {
    content: ' *';
    color: #f44336;
}

/* Form Inputs */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 1.5px solid #e6e9ef;
    border-radius: 8px;
    font-size: 14px;
    color: #212a34;
    font-style: italic;
    transition: all 0.2s ease;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: #bfc8cf;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #bfc8cf;
    font-style: italic;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e7884' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Input States */
.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #f44336;
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
    background: #f7f9fc;
    color: #bfc8cf;
    cursor: not-allowed;
}

/* Form Help Text */
.form-help {
    display: block;
    font-size: 12px;
    color: #6e7884;
    margin-top: 6px;
    font-style: italic;
}

.form-error {
    display: block;
    font-size: 12px;
    color: #f44336;
    margin-top: 6px;
    font-style: italic;
}

/* Radio & Checkbox */
.form-radio-group,
.form-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-radio-item,
.form-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-radio-item input[type="radio"],
.form-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1e88e5;
}

.form-radio-item label,
.form-checkbox-item label {
    font-size: 14px;
    font-weight: 500;
    color: #212a34;
    cursor: pointer;
    font-style: italic;
}

/* File Upload */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f7f9fc;
    border: 1.5px solid #e6e9ef;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #356197;
    cursor: pointer;
    transition: all 0.2s ease;
    font-style: italic;
}

.file-upload-label:hover {
    background: #e3f2fd;
    border-color: #1e88e5;
    color: #1e88e5;
}

.file-preview-wrapper {
    margin-top: 12px;
}

.file-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #e6e9ef;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-visual {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 2px solid #e6e9ef;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-picker-visual:hover {
    border-color: #1e88e5;
}

.color-picker-input {
    flex: 1;
    max-width: 120px;
}

/* === BUTTONS === */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: #1e88e5;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-style: italic;
    white-space: nowrap;
}

.btn:hover {
    background: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 136, 229, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #bfc8cf;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.btn-primary {
    background: #1e88e5;
}

.btn-primary:hover {
    background: #1976d2;
}

.btn-secondary {
    background: #6e7884;
}

.btn-secondary:hover {
    background: #5a6270;
}

.btn-success {
    background: #4caf50;
}

.btn-success:hover {
    background: #45a049;
}

.btn-warning {
    background: #ff9800;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-error {
    background: #f44336;
}

.btn-error:hover {
    background: #e53935;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid #1e88e5;
    color: #1e88e5;
}

.btn-outline:hover {
    background: #1e88e5;
    color: white;
}

.btn-ghost {
    background: transparent;
    color: #356197;
}

.btn-ghost:hover {
    background: #f7f9fc;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* === CARDS === */

.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e6e9ef;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e6e9ef;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #212a34;
    font-style: italic;
    margin: 0;
}

.card-body {
    font-size: 14px;
    color: #6e7884;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e6e9ef;
}

/* Stats Card */
.stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e6e9ef;
    transition: all 0.2s ease;
}

.stats-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stats-label {
    font-size: 12px;
    font-weight: 600;
    color: #6e7884;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-style: italic;
}

.stats-value {
    font-size: 32px;
    font-weight: 700;
    color: #212a34;
    margin-bottom: 8px;
    font-style: italic;
}

.stats-change {
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
}

.stats-change.positive {
    color: #4caf50;
}

.stats-change.negative {
    color: #f44336;
}

.stats-change.neutral {
    color: #6e7884;
}

/* === TABLES === */

.table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e6e9ef;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f7f9fc;
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #6e7884;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-style: italic;
    border-bottom: 1px solid #e6e9ef;
}

.table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #212a34;
    border-bottom: 1px solid #e6e9ef;
    font-style: italic;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f7f9fc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* === BADGES === */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.badge-error {
    background: #ffebee;
    color: #c62828;
}

.badge-info {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-neutral {
    background: #f5f5f5;
    color: #616161;
}

/* === ALERTS === */

.alert {
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    font-style: italic;
    border-left: 4px solid;
    margin-bottom: 20px;
}

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-error {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.alert-info {
    background: #e3f2fd;
    border-color: #1e88e5;
    color: #1565c0;
}

/* === MODAL === */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(33, 42, 52, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e6e9ef;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #212a34;
    font-style: italic;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6e7884;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7f9fc;
    color: #212a34;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 24px 24px;
    border-top: 1px solid #e6e9ef;
}

/* === LOADING === */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e6e9ef;
    border-top-color: #1e88e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === EMPTY STATE === */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.3;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #212a34;
    margin-bottom: 8px;
    font-style: italic;
}

.empty-description {
    font-size: 14px;
    color: #6e7884;
    margin-bottom: 20px;
    font-style: italic;
}