@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Rakuten+Sans+UI:wght@400;600&display=swap');

html, body {
    background: #fff;
    color: #000;
    font-family: 'Noto Sans JP', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1, h2 {
    color: #2d0047;
    font-weight: 700;
}

h3, h4, h5, h6, p, li, label {
    color: #000;
}

a, .btn-link {
    color: #2d0047;
    transition: color 0.2s;
}
a:hover, .btn-link:hover {
    color: #4a0072;
}

.btn-primary {
    background: #2d0047;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.5em 1.5em;
    box-shadow: 0 2px 8px rgba(45,0,71,0.2);
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-primary:hover, .btn-primary:focus {
    background: #4a0072;
    box-shadow: 0 4px 16px rgba(45,0,71,0.3);
}

.btn-secondary, .btn-outline-danger {
    background: #f5f5f5;
    color: #2d0047;
    border: 1.5px solid #2d0047;
    border-radius: 999px;
    font-weight: 700;
    padding: 0.5em 1.5em;
    transition: background 0.2s, color 0.2s;
}

.btn-secondary:hover, .btn-secondary:focus {
    background: #f0e6f5;
    color: #4a0072;
}

.status-badge {
    background: #2d0047;
    color: #fff;
}

.section-bg {
    background: #f8f9fa;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: #2d0047;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;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jMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* RTL specific styles - Minimal approach to prevent distortion */
[dir="rtl"] {
    direction: rtl;
}

/* Essential RTL Text Direction Only */
[dir="rtl"] .language-selector select {
    direction: rtl;
}

[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .form-control {
    direction: rtl;
    text-align: right;
}

/* Minimal RTL Layout - Only essential elements */
[dir="rtl"] .firtsline-inner {
    flex-direction: row-reverse;
}

[dir="rtl"] .firtsline-innerh_right {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .custom-navbar-btn {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .custom-navbar-btn:last-child {
    margin-right: 0;
    margin-left: 8px;
}

/* RTL Tables - Essential Only */
[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

/* RTL Navigation - Essential Only */
[dir="rtl"] .nav-link {
    padding-right: 0;
    padding-left: 0.5rem;
}

/* RTL Custom Components - Essential Only */
[dir="rtl"] .dashboard-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .hamburger-btn {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .nav-links-container a {
    margin-right: 0;
    margin-left: 1rem;
}

[dir="rtl"] .nav-links-container a:last-child {
    margin-left: 0;
}

/* Mobile RTL - Removed conflicting rules, handled by toprow.css */
@media (max-width: 768px) {
    [dir="rtl"] .dashboard-header {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    [dir="rtl"] .hamburger-btn {
        margin: 0.5rem 0 !important;
        align-self: center !important;
    }
    
    [dir="rtl"] .nav-links-container {
        text-align: center !important;
        flex-direction: column !important;
    }
    
    [dir="rtl"] .nav-links-container a {
        margin: 0.5rem 0 !important;
        display: block !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .firtsline-inner {
        padding: 0.5rem !important;
    }
    
    [dir="rtl"] .custom-navbar-btn,
    [dir="rtl"] .custom-navbar-lang {
        max-width: 180px !important;
    }
    
    [dir="rtl"] .dashboard-header .fw-bold {
        font-size: 1.1rem !important;
    }
}

/* Modal styles */
.modal.show {
    display: block;
}

.modal:not(.show) {
    display: none;
}

/* Progress bar styles */
.password-progress {
    height: 5px;
    width: 100px;
}

.password-progress .progress-bar {
    transition: width 0.3s ease-in-out;
}

/* Improved Header Responsiveness */
@media (max-width: 576px) {
    .header-content {
        padding: 0.5rem;
    }

    .left-section .logo {
        max-height: 120px;
    }

    .right-section {
        margin-top: 1rem;
    }

    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

/* Improved Form Responsiveness */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1rem;
    }

    input.form-control, 
    select.form-control, 
    textarea.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-content {
        padding: 1rem;
    }
}

/* Improved Grid Layout */
@media (max-width: 768px) {
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }

    .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
    .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        padding-left: 0.5rem;
        padding-right:do 0.5rem;
    }
}

/* Improved Table Responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        margin-bottom: 1rem;
    }

    .table th, .table td {
        white-space: nowrap;
        padding: 0.5rem;
    }
}

/* Improved Card Layout */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}

/* Improved Button Spacing */
@media (max-width: 576px) {
    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        margin: 0.25rem 0;
        border-radius: 0.5rem !important;
    }
}

/* Standardized Button Style */
.btn,
button,
[type="button"],
[type="submit"],
[type="reset"] {
    color: #000 !important;
    background-color: transparent !important;
    border: 1px solid #000 !important;
    border-radius: 8px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
}

.btn:hover,
button:hover,
[type="button"]:hover,
[type="submit"]:hover,
[type="reset"]:hover {
    color: #000 !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: #000 !important;
}

.btn:active,
button:active,
[type="button"]:active,
[type="submit"]:active,
[type="reset"]:active {
    color: #000 !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
}

.btn:disabled,
button:disabled,
[type="button"]:disabled,
[type="submit"]:disabled,
[type="reset"]:disabled {
    color: #666 !important;
    border-color: #666 !important;
    background-color: transparent !important;
    cursor: not-allowed !important;
}

.carousel-control-prev,
.carousel-control-next {
    background-color: rgba(45, 0, 71, 0.7); /* dark purple with transparency */
    border-radius: 50%;
    width: 56px;
    height: 56px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-size: 2.5rem 2.5rem;
    filter: invert(1) drop-shadow(0 0 2px #fff);
}

@keyframes ticker-scroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

.globButton {
    /* Unset Bootstrap and FontAwesome variables */
    --bs-blue: unset !important;
    --bs-indigo: unset !important;
    --bs-purple: unset !important;
    --bs-pink: unset !important;
    --bs-red: unset !important;
    --bs-orange: unset !important;
    --bs-yellow: unset !important;
    --bs-green: unset !important;
    --bs-teal: unset !important;
    --bs-cyan: unset !important;
    --bs-white: unset !important;
    --bs-gray: unset !important;
    --bs-gray-dark: unset !important;
    --bs-gray-100: unset !important;
    --bs-gray-200: unset !important;
    --bs-gray-300: unset !important;
    --bs-gray-400: unset !important;
    --bs-gray-500: unset !important;
    --bs-gray-600: unset !important;
    --bs-gray-700: unset !important;
    --bs-gray-800: unset !important;
    --bs-gray-900: unset !important;
    --bs-primary: unset !important;
    --bs-secondary: unset !important;
    --bs-success: unset !important;
    --bs-info: unset !important;
    --bs-warning: unset !important;
    --bs-danger: unset !important;
    --bs-light: unset !important;
    --bs-dark: unset !important;
    --bs-primary-rgb: unset !important;
    --bs-secondary-rgb: unset !important;
    --bs-success-rgb: unset !important;
    --bs-info-rgb: unset !important;
    --bs-warning-rgb: unset !important;
    --bs-danger-rgb: unset !important;
    --bs-light-rgb: unset !important;
    --bs-dark-rgb: unset !important;
    --bs-white-rgb: unset !important;
    --bs-black-rgb: unset !important;
    --bs-body-rgb: unset !important;
    --bs-font-sans-serif: unset !important;
    --bs-font-monospace: unset !important;
    --bs-gradient: unset !important;
    --bs-body-font-family: unset !important;
    --bs-body-font-size: unset !important;
    --bs-body-font-weight: unset !important;
    --bs-body-line-height: unset !important;
    --bs-body-color: unset !important;
    --bs-body-bg: unset !important;
    --fa-style-family-brands: unset !important;
    --fa-font-brands: unset !important;
    --fa-font-regular: unset !important;
    --fa-style-family-classic: unset !important;
    --fa-font-solid: unset !important;

    /* Rakuten .css-1rydq7m button style */
    appearance: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    color: #8529cd !important;
    cursor: pointer !important;
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    font-family: "Rakuten Sans UI", system-ui, Arial, Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    height: 40px !important;
    line-height: 40px !important;
    outline: none !important;
    padding: 0 16px !important;
    border-radius: 20px !important;
    transition: background 0.2s cubic-bezier(0.4,0,0.2,1), color 0.2s cubic-bezier(0.4,0,0.2,1) !important;
    user-select: none !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    min-width: 80px !important;
    text-align: center !important;
    letter-spacing: 0.03em !important;
}

.globButton:hover, .globButton:focus {
    background: #f4f3fe !important;
    color: #7119b8 !important;
}

/* Body-level RTL Support */
/* RTL Support - Removed conflicting body.rtl rules to prevent distortion */
