/* MATSAŞ Design System v2 */
:root {
    --brand-primary: #7F56D9;
    --brand-primary-hover: #6941C6;
    --brand-primary-light: #9E77ED;

    --text-primary-900: #181D27;
    --text-secondary-700: #414651;
    --text-tertiary-600: #535862;
    --text-quaternary-500: #717680;
    --text-placeholder: #717680;

    --background-primary: #FFFFFF;
    --background-secondary: #F9FAFB;
    --background-overlay: rgba(52, 64, 84, 0.7);

    --border-color: #E4E7EC;
    --border-radius: 8px;
    --border-radius-lg: 12px;

    --error-color: #F04438;
    --success-color: #12B76A;
    --warning-color: #F79009;

    --shadow-sm: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
    --shadow-xs: 0 1px 2px 0 rgba(10, 13, 18, 0.05);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    color: var(--text-primary-900);
    line-height: 1.5;
    background-color: var(--background-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale - Design System */
.display-sm-semibold {
    font-weight: 600;
    font-size: 30px;
    line-height: 38px;
    color: var(--text-primary-900);
}

.display-xs-semibold {
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    color: var(--text-primary-900);
}

.text-md-regular {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-tertiary-600);
}

.text-lg-semibold {
    font-weight: 600;
    font-size: 18px;
    line-height: 28px;
    color: var(--text-primary-900);
}

.text-sm-medium {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-secondary-700);
}

.text-sm-semibold {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-primary-900);
}

.text-sm-regular {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-tertiary-600);
}

.text-md-medium {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-secondary-700);
}

.text-md-semibold {
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary-900);
}

.text-md-bold {
    font-weight: 700;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary-900);
}

.text-xs-regular {
    font-weight: 400;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-tertiary-600);
}

.text-xs-medium {
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-secondary-700);
}

.text-xs-semibold {
    font-weight: 600;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-secondary-700);
}

/* Typography */
.text-sm {
    font-size: 14px;
}

.text-base {
    font-size: 16px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 30px;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

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

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

.text-tertiary {
    color: var(--text-tertiary-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--brand-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 16px 28px;
    font-size: 18px;
    min-height: 56px;
}

.btn-full {
    width: 100%;
}

/* Primary Button Component */
.btn-primary-v2 {
    background-color: var(--brand-primary);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
}

.btn-primary-v2:hover:not(:disabled) {
    background-color: var(--brand-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary-v2:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Secondary Button Component */


.btn.btn-secondary-v2 {
    background-color: #FFFFFF !important;
    color: #414651 !important;
    border: 1px solid #D5D7DA !important;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    min-height: 48px;
    transition: all 0.2s ease-in-out;
    box-shadow: none !important;
}

.btn.btn-secondary-v2:hover:not(:disabled) {
    background-color: #F9FAFB !important;
    color: #414651 !important;
    border-color: #D5D7DA !important;
}

.btn.btn-secondary-v2:active:not(:disabled),
.btn.btn-secondary-v2.active:not(:disabled) {
    background-color: #F9FAFB !important;
    color: #414651 !important;
    border-color: #D5D7DA !important;
}

.btn.btn-secondary-v2:focus-visible {
    outline: 2px solid rgba(127, 86, 217, 0.24);
    outline-offset: 2px;
}

.btn.btn-secondary-v2:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #414651 !important;
}

/* Form inputs */
.input-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary-700);
    margin-bottom: 6px;
    line-height: 20px;
}

.input-label.required::after {
    content: ' *';
    color: var(--error-color);
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.2s ease-in-out;
    background-color: white;
    min-height: 48px;
}

.form-input.has-left-icon {
    padding-left: 44px;
}

.form-input.has-right-icon {
    padding-right: 44px;
}

.form-input.size-small {
    padding: 8px 12px;
    font-size: 14px;
    min-height: 36px;
}

.form-input.size-small.has-left-icon {
    padding-left: 36px;
}

.form-input.size-small.has-right-icon {
    padding-right: 36px;
}

.form-input.size-large {
    padding: 16px 20px;
    font-size: 18px;
    min-height: 56px;
}

.form-input.size-large.has-left-icon {
    padding-left: 52px;
}

.form-input.size-large.has-right-icon {
    padding-right: 52px;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(240, 68, 56, 0.1);
}

.form-input:disabled {
    background-color: var(--background-secondary);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.form-input::placeholder {
    color: var(--text-placeholder);
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    pointer-events: none;
    z-index: 2;
}

.input-icon-left {
    left: 12px;
}

.input-icon-right {
    right: 12px;
}

.size-small .input-icon-left {
    left: 10px;
}

.size-small .input-icon-right {
    right: 10px;
}

.size-large .input-icon-left {
    left: 16px;
}

.size-large .input-icon-right {
    right: 16px;
}

.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    pointer-events: auto;
    transition: color 0.2s ease;
    color: var(--text-placeholder);
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--text-secondary-700);
    background-color: rgba(0, 0, 0, 0.04);
}

.password-toggle:active {
    background-color: rgba(0, 0, 0, 0.08);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 14px;
    margin-top: 6px;
}

.help-text {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 6px;
}

.input-group.error .input-label {
    color: var(--error-color);
}

.input-group.success .form-input {
    border-color: var(--success-color);
}

.input-group.success .form-input:focus {
    box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.1);
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Layout utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.gap-8 {
    gap: 32px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
    }

    .btn-large {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }

    .form-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Navbar Styles */
.navbar-nav .nav-link {
    transition: all 0.2s ease;
}

.menu-nav-link {
    color: var(--text-secondary-700);
    border: none;
    background-color: transparent;
}

.menu-nav-link:hover,
.menu-nav-link:focus {
    color: var(--text-primary-900);
    background-color: var(--background-secondary);
}

.menu-dropdown {
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 0;
}

.navbar-nav .nav-link:hover {
    background-color: var(--background-secondary) !important;
    color: var(--text-primary-900) !important;
}

/* Dropdown arrows gizle */
.navbar-nav .nav-link::after {
    display: none !important;
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius);
    padding: 8px 0;
}

.dropdown-item {
    color: var(--text-secondary-700);
    padding: 8px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--background-secondary);
    color: var(--text-primary-900);
}

.dropdown-item:focus {
    background-color: var(--background-secondary);
    color: var(--text-primary-900);
}

/* Profile edit */
.profile-page-wrapper {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px 96px;
}

.profile-page-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.profile-section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.profile-section-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0 16px;
}

.profile-field-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-field-row:first-of-type {
    padding-top: 0;
}

.profile-field-row--no-divider,
.profile-field-row:last-of-type {
    border-bottom: none;
}

.profile-field-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text-secondary-700);
}

.profile-field-label-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary-700);
}

.profile-field-label-text.is-required::after {
    content: '*';
    color: var(--error-color);
}

.profile-field-description {
    color: var(--text-tertiary-600);
}

.profile-field-control {
    width: 100%;
    max-width: 400px;
}

.profile-field-control .form-input,
.profile-field-control .input-wrapper {
    width: 100%;
    max-width: 400px;
}

.profile-photo-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-upload-dropzone {
    border: 2px dashed var(--brand-primary);
    border-radius: 12px;
    padding: 20px;
    min-height: 136px;
    max-width: 400px;
    background-color: rgba(127, 86, 217, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 12px;
    color: var(--brand-primary);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.profile-upload-dropzone:hover {
    background-color: rgba(127, 86, 217, 0.08);
}

.profile-upload-hint {
    color: var(--text-tertiary-600);
}

.profile-upload-action {
    color: var(--brand-primary);
}

.profile-upload-filename {
    color: var(--text-tertiary-600);
}

.profile-select-wrapper {
    position: relative;
}

.profile-select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--text-tertiary-600);
    border-bottom: 2px solid var(--text-tertiary-600);
    transform: translateY(-50%) rotate(45deg);
    pointer-events: none;
}

.profile-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #FFFFFF;
    padding-right: 48px;
}

.profile-password-actions {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.profile-password-actions .btn {
    padding: 12px 32px;
    height: 48px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
}

.profile-actions-bar .btn {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
}

.profile-actions-bar {
    padding-top: 24px;
    display: flex;
    justify-content: flex-end;
}

/* Page Layouts */
.page-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.page-heading .display-xs-semibold {
    margin: 0;
}

/* Data Table */
.data-table-card {
    background-color: var(--background-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.data-table-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.data-table-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.data-table-title {
    margin: 0;
    color: var(--text-primary-900);
}

.data-table-counter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #D5D7DA;
    background-color: var(--background-primary);
    box-shadow: var(--shadow-xs);
    color: var(--text-secondary-700);
}

.data-table-description {
    margin: 0;
    color: var(--text-tertiary-600);
}

.data-table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-table-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 24px 16px;
    border-top: 1px solid var(--border-color);
}

.data-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
}

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

.data-table thead {
    background-color: transparent;
}

.data-table-header-cell {
    font-size: 12px;
    font-weight: 600;
    line-height: 18px;
    color: var(--text-quaternary-500);
    padding: 14px 16px;
    white-space: nowrap;
}

.data-table-sort-icon {
    display: inline-flex;
    margin-left: 4px;
    color: var(--text-tertiary-600);
}

.data-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.data-table tbody tr:hover {
    background-color: rgba(127, 86, 217, 0.04);
}

.data-table-cell {
    padding: 18px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary-700);
    vertical-align: middle;
}

.data-table-col-28 {
    width: 28%;
}

.data-table-col-24 {
    width: 24%;
}

.data-table-col-20 {
    width: 20%;
}

.data-table-col-16 {
    width: 16%;
}

.data-table-col-12 {
    width: 12%;
}

.data-table-email,
.data-table-email a {
    color: var(--text-tertiary-600);
}

.data-table-cell.align-left {
    text-align: left;
}

.data-table-cell.align-center {
    text-align: center;
}

.data-table-cell.align-right {
    text-align: right;
}

.data-table-header-cell.align-right {
    text-align: right;
}

.data-table-header-cell.align-center {
    text-align: center;
}

.data-table-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-tertiary-600);
}

.data-table-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--background-primary);
}

.data-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.data-table-pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.data-table-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--background-secondary);
    color: var(--text-secondary-700);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.data-table-pagination-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background-color: rgba(127, 86, 217, 0.08);
}

.data-table-pagination-btn.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.data-table-pagination-pages {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.data-table-pagination-page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-tertiary-600);
    font-weight: 500;
    background-color: transparent;
    transition: all 0.2s ease-in-out;
}

.data-table-pagination-page:hover {
    border-color: rgba(127, 86, 217, 0.3);
    color: var(--brand-primary);
    background-color: rgba(127, 86, 217, 0.06);
}

.data-table-pagination-page.is-active {
    background-color: rgba(127, 86, 217, 0.16);
    border-color: rgba(127, 86, 217, 0.4);
    color: var(--brand-primary);
    font-weight: 600;
}

.data-table-pagination-gap {
    color: var(--text-tertiary-600);
}

.table-cell-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-cell-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--background-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary-700);
    overflow: hidden;
}

.table-cell-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-cell-person-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-cell-person-name {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-primary-900);
}

.table-cell-person-email {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--text-tertiary-600);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #D5D7DA;
    background-color: var(--background-primary);
    box-shadow: var(--shadow-xs);
    color: var(--text-secondary-700);
}

/* Status Pill Variants */
.status-pill--warning {
    background: #FFFAEB;
    border: 1px solid #FEDF89;
}

.status-pill--warning .status-pill-label {
    color: #B54708;
}

.status-pill--success {
    background: #ECFDF3;
    border: 1px solid #ABEFC6;
}

.status-pill--success .status-pill-label {
    color: #067647;
}

.status-pill--error {
    background: #FEF3F2;
    border: 1px solid #FECDCA;
}

.status-pill--error .status-pill-label {
    color: #B42318;
}

.status-pill--delivered {
    background: #FAFAFA;
    border: 1px solid #E9EAEB;
}

.status-pill--delivered .status-pill-label {
    color: #414651;
}

.status-pill-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator--active {
    background-color: var(--success-color);
}

.status-indicator--inactive {
    background-color: #D0D5DD;
}

.status-indicator--pending {
    background-color: var(--warning-color);
}

.status-indicator--info {
    background-color: var(--primary-color);
}

/* Status Indicator Variants for Custom Pills */
.status-indicator--warning {
    background-color: #F79009;
}

.status-indicator--success {
    background-color: #17B26A;
}

.status-indicator--error {
    background-color: #F04438;
}

.status-indicator--delivered {
    background-color: #717680;
}

.status-pill-label {
    color: var(--text-secondary-700);
}

.role-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 500;
    font-size: 12px;
    line-height: 18px;
}

.role-tag--sistem-admin {
    background-color: rgba(127, 86, 217, 0.12);
    border-color: rgba(127, 86, 217, 0.32);
    color: var(--brand-primary);
}

.role-tag--planlamaci {
    background-color: rgba(10, 149, 255, 0.12);
    border-color: rgba(10, 149, 255, 0.32);
    color: #0B76E0;
}

.role-tag--uretim-personeli {
    background-color: rgba(18, 183, 106, 0.12);
    border-color: rgba(18, 183, 106, 0.32);
    color: #027948;
}

.role-tag--grafik {
    background-color: rgba(247, 144, 9, 0.12);
    border-color: rgba(247, 144, 9, 0.32);
    color: #B54708;
}

.role-tag--muhasebe {
    background-color: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.32);
    color: #1D4ED8;
}

.role-tag--default {
    background-color: rgba(65, 70, 81, 0.08);
    border-color: rgba(65, 70, 81, 0.2);
    color: var(--text-secondary-700);
}

.table-cell-actions {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary-700);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    padding: 0;
}

.icon-button:hover {
    background-color: rgba(127, 86, 217, 0.08);
    color: var(--brand-primary);
}

.icon-button.is-danger {
    color: #D92D20;
}

.icon-button.is-danger:hover {
    background-color: rgba(240, 68, 56, 0.12);
    color: #F04438;
}

.icon-button:focus-visible {
    outline: 2px solid rgba(127, 86, 217, 0.24);
    outline-offset: 2px;
}

@media (max-width: 992px) {
    .data-table-header {
        align-items: flex-start;
    }

    .data-table-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .data-table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-cell-avatar {
        width: 32px;
        height: 32px;
    }

    .data-table-cell {
        padding: 14px 12px;
    }

    .data-table-header-cell {
        padding: 12px;
    }

    .data-table-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table-pagination-btn {
        justify-content: center;
    }

    .data-table-pagination-pages {
        justify-content: center;
    }
}

@media (min-width: 768px) {
    .profile-page-wrapper {
        padding: 0 64px 112px;
    }

    .profile-page-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 40px;
    }

    .profile-field-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 32px;
    }

    .profile-field-label {
        flex: 0 0 260px;
        max-width: 280px;
    }

    .profile-photo-group {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }
}

/* Modal Components */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg, 12px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    z-index: 1;
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.user-create-modal {
    max-width: 420px;
    padding: 32px 32px 24px;
}

.user-create-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    margin-bottom: 24px;
}

.user-create-modal-illustration {
    width: 104px;
    height: 72px;
    object-fit: contain;
}

.user-create-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-create-modal-form .input-group {
    margin-bottom: 0;
}

.user-create-modal-footer {
    margin: 0 -32px -24px;
    padding: 32px 32px 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.password-change-modal {
    padding: 96px 0 0 0;
    overflow: hidden;
}

.modal-header-icon {
    display: flex;
    justify-content: center;
    padding: 32px 32px 16px 32px;
}

.password-change-modal .modal-header-icon {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 280px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}

.modal-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.password-change-modal .modal-icon {
    width: 100%;
    height: auto;
}

.password-change-modal .modal-header,
.password-change-modal .modal-body,
.password-change-modal .modal-footer {
    position: relative;
    z-index: 1;
}

.modal-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-tertiary-600, #70707B);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 2;
}

.modal-close-button:hover {
    background: rgba(24, 29, 39, 0.06);
    color: var(--text-secondary-700, #414651);
}

.modal-close-button:focus-visible {
    outline: 2px solid var(--brand-primary, #7F56D9);
    outline-offset: 2px;
}

.password-change-modal .modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-top: 6px;
}

.password-change-modal .password-change-form,
.password-change-modal .password-change-form .form-group,
.password-change-modal .password-change-form .input-group,
.password-change-modal .password-change-form .input-wrapper {
    width: 100%;
}

.modal-header {
    text-align: center;
    padding: 0 32px 24px 32px;
}

.modal-title {
    margin: 0 0 8px 0;
}

.modal-description {
    margin: 0;
}

.modal-body {
    padding: 0 32px 24px 32px;
}

.password-change-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.password-change-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.password-change-form .form-label {
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    border-top: 1px solid var(--neutral-200, #E5E7EB);
}

.modal-footer .btn {
    flex: 1;
}

.password-change-modal .modal-body {
    padding-bottom: 12px;
}

.password-change-modal .modal-footer {
    border-top: none;
    padding: 16px 32px 32px;
}

.password-change-modal .btn-secondary-v2 {
    color: var(--text-secondary-700, #414651) !important;
    background-color: #FFFFFF;
    border-color: #D5D7DA;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--background-primary);
    color: var(--text-primary-900);
    font-size: 16px;
    line-height: 24px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23414651' stroke-width='1.33' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    min-height: 48px;
}

.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.12);
    outline: none;
}

.form-select:disabled {
    background-color: var(--background-secondary);
    color: var(--text-tertiary-600);
    cursor: not-allowed;
}

.password-change-modal .btn-secondary-v2:hover:not(:disabled) {
    color: var(--text-secondary-700, #414651) !important;
    background-color: #F7F7F8;
    border-color: var(--brand-primary, #7F56D9);
}

.password-change-modal .btn-secondary-v2:focus-visible {
    outline: 2px solid rgba(127, 86, 217, 0.24);
    outline-offset: 2px;
}

/* Modal responsive adjustments */
@media (max-width: 480px) {
    .modal-content {
        margin: 16px;
        width: calc(100% - 32px);
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 24px;
        padding-right: 24px;
    }

    .password-change-modal {
        padding-top: 100px;
    }

    .password-change-modal .modal-header-icon {
        top: -44px;
        width: 210px;
        height: 210px;
    }

    .password-change-modal .modal-close-button {
        top: 16px;
        right: 16px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}