/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

/* Global Image Constraints - Prevent Logo Overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    box-sizing: border-box;
}

.login-container img {
    max-width: 100%;
    height: auto;
}

.login-box {
    background: white;
    padding: 45px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    position: relative;
}

.login-logo span {
    display: none;
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    z-index: 2;
}

.login-logo-image {
    max-width: 180px !important;
    width: auto !important;
    height: auto !important;
    max-height: 50px !important;
    min-height: 30px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.login-box h2 {
    color: #718096;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 35px;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Login Form Specific Styles */
.login-box .form-group {
    margin-bottom: 24px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 10px;
    color: #2d3748;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.login-box .form-control {
    width: 100%;
    padding: 14px 16px 14px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    color: #2d3748;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.login-box .form-control:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.login-box .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12), 0 4px 12px rgba(102, 126, 234, 0.15);
    background-color: #ffffff;
    transform: translateY(-1px);
}

.login-box .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.login-box .input-wrapper {
    position: relative;
}

.login-box .input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: all 0.3s ease;
    display: block;
}

.login-box .input-wrapper:focus-within .input-icon {
    opacity: 1;
    transform: translateY(-50%);
}

/* Professional User Icon */
.login-icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
    width: 18px;
    height: 18px;
}

.login-box .input-wrapper:focus-within .login-icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
}

/* Professional Lock Icon */
.login-icon-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
    width: 18px;
    height: 18px;
}

.login-box .input-wrapper:focus-within .login-icon-lock {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'%3E%3C/path%3E%3C/svg%3E");
}

/* Login Button Icon */
.login-btn-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'%3E%3C/path%3E%3Cpath d='m12 5 7 7-7 7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    vertical-align: middle;
}

/* Professional Form Icons */
.form-icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-user {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
}

.form-icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'%3E%3C/path%3E%3Cpolyline points='22,6 12,13 2,6'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
}

.form-icon-calendar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-calendar {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

.form-icon-percent {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='5' x2='5' y2='19'%3E%3C/line%3E%3Ccircle cx='6.5' cy='6.5' r='2.5'%3E%3C/circle%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-percent {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='5' x2='5' y2='19'%3E%3C/line%3E%3Ccircle cx='6.5' cy='6.5' r='2.5'%3E%3C/circle%3E%3Ccircle cx='17.5' cy='17.5' r='2.5'%3E%3C/circle%3E%3C/svg%3E");
}

.form-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.input-wrapper:focus-within .form-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
}

/* General form icon styling */
.form-icon-user,
.form-icon-email,
.form-icon-phone,
.form-icon-calendar,
.form-icon-percent,
.form-icon-search {
    opacity: 0.6;
    transition: all 0.3s ease;
}

.input-wrapper:focus-within .form-icon-user,
.input-wrapper:focus-within .form-icon-email,
.input-wrapper:focus-within .form-icon-phone,
.input-wrapper:focus-within .form-icon-calendar,
.input-wrapper:focus-within .form-icon-percent,
.input-wrapper:focus-within .form-icon-search {
    opacity: 1;
}

.login-box .btn-primary {
    margin-top: 10px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-box .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-box .btn-primary:hover::before {
    left: 100%;
}

.login-box .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.login-box .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.login-info {
    margin-top: 25px;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #edf2f7 100%);
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.login-info p {
    margin-bottom: 8px;
    color: #4a5568;
}

.login-info p:last-child {
    margin-bottom: 0;
}

.login-info strong {
    color: #2d3748;
    font-weight: 600;
}

.login-info code {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: inline-block;
    margin-left: 4px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.header img {
    max-width: 100%;
    height: auto;
}

.header .logo-image {
    max-width: 180px !important;
    height: 36px !important;
    width: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.header-content .logo {
    flex: 0 0 auto;
}

.logo {
    display: flex !important;
    align-items: center;
    min-width: 120px !important;
    flex-shrink: 0;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    color: inherit;
    overflow: visible;
    height: auto;
    position: relative;
}

.logo:link,
.logo:visited,
.logo:hover,
.logo:active {
    text-decoration: none !important;
}

.logo-text {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #667eea !important;
    letter-spacing: -0.5px;
    display: block !important;
    line-height: 1;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.logo:hover .logo-text {
    color: #5568d3 !important;
    transform: scale(1.02);
}

.logo:active .logo-text {
    transform: scale(0.98);
}

.logo:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.logo:active {
    opacity: 0.75;
    transform: scale(0.98);
}

.logo:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-image {
    height: 36px !important;
    width: auto !important;
    max-width: 200px !important;
    min-width: 120px !important;
    object-fit: contain !important;
    object-position: left center !important;
    display: none !important;
    visibility: hidden !important;
}

.logo-text {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

.logo span {
    color: #718096;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav a {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover {
    background: #f5f7fa;
    color: #667eea;
}

.nav a.active {
    background: #667eea;
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu span {
    color: #666;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    color: #333;
    font-size: 32px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    transition: box-shadow 0.3s ease;
}

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

.form-card {
    padding: 20px;
}

.dashboard-card.form-card {
    padding: 20px;
}

.form-section-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section-header h2 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.form-section-description {
    color: #64748b;
    font-size: 12px;
    margin: 0;
    font-weight: 400;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2 {
    color: #333;
    font-size: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-content h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 14px;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.025em;
    transition: color 0.2s ease;
    text-transform: uppercase;
}

.form-group:focus-within label {
    color: #667eea;
}

.form-group .required {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 2px;
}

.form-control {
    width: 100%;
    height: 36px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    color: #1e293b;
    font-family: inherit;
    box-shadow: none;
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.form-control:disabled {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    padding-top: 8px;
    height: auto;
}

input[type="date"].form-control,
input[type="number"].form-control {
    position: relative;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 4px;
    margin-left: 8px;
    z-index: 5;
    position: relative;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* For date inputs with icons, adjust calendar icon position */
.input-wrapper input[type="date"].form-control::-webkit-calendar-picker-indicator {
    margin-left: 0;
    margin-right: 8px;
}

input[type="number"].form-control::-webkit-inner-spin-button,
input[type="number"].form-control::-webkit-outer-spin-button {
    opacity: 0.6;
    cursor: pointer;
}

/* Input validation states */
.form-control:valid:not(:placeholder-shown) {
    border-color: #cbd5e1;
}

.form-control:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #f56565;
}

/* Enhanced focus ring animation */
@keyframes focusRing {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12), 0 4px 12px rgba(102, 126, 234, 0.15);
    }
}

.form-control:focus {
    animation: focusRing 0.3s ease-out;
}

/* Loading state for inputs */
.form-control:disabled,
.form-control[readonly] {
    cursor: default;
    opacity: 0.8;
}

/* Enhanced table input styling */
.table input[type="number"] {
    padding: 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 100px;
    transition: all 0.2s;
}

.table input[type="number"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Input validation states */
.form-control:valid:not(:placeholder-shown) {
    border-color: #cbd5e1;
}

.form-control:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #f56565;
}

/* Enhanced focus ring animation */
@keyframes focusRing {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12), 0 4px 12px rgba(102, 126, 234, 0.15);
    }
}

.form-control:focus {
    animation: focusRing 0.3s ease-out;
}

/* Input with icon wrapper */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 10;
    line-height: 1;
    opacity: 1;
    transition: all 0.3s ease;
    filter: grayscale(0);
    -webkit-font-smoothing: antialiased;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.input-wrapper .form-control {
    padding-left: 40px;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    height: 36px;
}

/* Ensure text doesn't overlap icon */
.input-wrapper input.form-control,
.input-wrapper textarea.form-control {
    text-indent: 0;
}

.input-wrapper:focus-within .input-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    filter: grayscale(0);
}

.input-wrapper:hover .input-icon {
    opacity: 1;
}

/* Make sure emoji renders properly and is always visible */
.input-wrapper .input-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-feature-settings: normal;
    font-feature-settings: normal;
    will-change: transform;
    backface-visibility: hidden;
}

/* Ensure icon stays visible when input has content */
.input-wrapper:has(.form-control:not(:placeholder-shown)) .input-icon,
.input-wrapper:has(.form-control:valid) .input-icon {
    opacity: 1;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

/* Dashboard Form Styles */
.dashboard-card.form-card .form-section-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-card.form-card .form-section-header h2 {
    color: #0f172a;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.dashboard-card.form-card .form-section-description {
    color: #64748b;
    font-size: 12px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.search-form .form-control {
    flex: 1;
    min-width: 200px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: none;
    letter-spacing: 0.2px;
}

.btn:hover {
    background: #5568d3;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: #6366f1;
    box-shadow: none;
}

.btn-primary:hover {
    background-color: #4f46e5;
    box-shadow: none;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 13px;
}

/* Compact button variant for table actions */
.btn-compact {
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    min-width: 90px;
    position: relative;
    overflow: hidden;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-action:hover::before {
    left: 100%;
}

.btn-action .btn-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.btn-action .btn-text {
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.btn-edit {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(66, 153, 225, 0.4);
    color: white;
}

.btn-edit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-delete:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 101, 101, 0.4);
    color: white;
}

.btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(245, 101, 101, 0.3);
}

.btn-view {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #2f855a;
}

.btn-view:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
    color: white;
}

.btn-view:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-print {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    border-color: #c05621;
}

.btn-print:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(237, 137, 54, 0.3);
    color: white;
}

.btn-print:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Table Actions Column */
.table td:last-child {
    white-space: nowrap;
    min-width: 200px;
    padding: 12px 15px;
}

.table thead th:last-child {
    text-align: center;
}

.table tbody td:last-child {
    text-align: center;
}

/* Responsive action buttons */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .btn-compact {
        padding: 3px 8px;
        font-size: 12px;
    }
    
    .btn-action {
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .table td:last-child {
        min-width: 150px;
        padding: 10px;
    }
    
    .table thead th:last-child,
    .table tbody td:last-child {
        text-align: left;
    }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(to right, #d4edda, #c3e6cb);
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: linear-gradient(to right, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left-color: #dc3545;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table thead {
    background: #f8f9fa;
}

.table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

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

.table tfoot {
    background: #f8f9fa;
    font-weight: 600;
}

.table tfoot td {
    border-top: 2px solid #dee2e6;
}

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

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

.total-row {
    background: #f0f9ff !important;
    font-size: 16px;
}

/* Item Search */
.item-search {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.search-input {
    font-size: 16px;
    padding: 16px 16px 16px 48px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
    overflow-x: hidden;
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 8px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.search-result-item {
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f0f4f8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:hover {
    background: linear-gradient(to right, #f7fafc, #edf2f7);
    border-left: 3px solid #667eea;
    padding-left: 15px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item strong {
    color: #667eea;
    font-weight: 600;
    min-width: 100px;
}

/* Quotation View */
.quotation-view {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.quotation-view .dashboard-card {
    padding: 32px 40px;
}

@media (max-width: 768px) {
    .quotation-view .dashboard-card {
        padding: 24px 20px;
    }
}

.quotation-view img {
    max-width: 100%;
    height: auto;
}

.quotation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    gap: 32px;
}

.quotation-header-left {
    flex: 1;
}

.quotation-header h2 {
    color: #6366f1;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.quotation-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quotation-header p {
    margin: 0;
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quotation-header p strong {
    color: #1e293b;
    font-weight: 600;
    min-width: 100px;
    display: inline-block;
}

.quotation-logo {
    text-align: right;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 4px;
    min-width: 140px;
}

.quotation-logo-text {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #6366f1 !important;
    letter-spacing: -0.5px;
    display: block !important;
    line-height: 1.4;
    text-align: right;
    margin: 0;
    padding: 0;
}

.quotation-logo-image {
    display: none !important;
    visibility: hidden !important;
}

.quotation-body {
    margin-top: 30px;
}

.quotation-section {
    margin-bottom: 32px;
}

.quotation-section h3 {
    color: #1e293b;
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quotation-section p {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.quotation-section p strong {
    color: #1e293b;
    font-weight: 600;
    min-width: 80px;
    display: inline-block;
}

.quotation-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    color: #666;
    font-size: 14px;
}

/* Quotation Items Table Styling */
.quotation-items-table {
    margin-top: 24px;
    margin-bottom: 24px;
}

.quotation-items-table thead {
    background-color: #f1f5f9;
}

.quotation-items-table thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.quotation-items-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.quotation-items-table tbody tr:hover {
    background-color: #f8fafc;
}

.quotation-items-table tfoot {
    background-color: #ffffff;
}

.quotation-items-table tfoot td {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
}

.quotation-items-table .total-row {
    background-color: #f8fafc !important;
    border-top: 2px solid #e2e8f0 !important;
}

/* Upload Info */
.upload-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.upload-info h3 {
    margin-bottom: 15px;
    color: #333;
}

.upload-info ol {
    margin-left: 20px;
    margin-top: 10px;
}

.upload-info li {
    margin-bottom: 8px;
}

/* Footer */
.footer {
    background: #fff;
    padding: 20px;
    text-align: center;
    color: #666;
    margin-top: 50px;
    border-top: 1px solid #dee2e6;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo-text {
        font-size: 28px !important;
    }

    .nav {
        width: 100%;
    }

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quotation-header {
        flex-direction: column;
    }

    .quotation-logo {
        text-align: left;
        justify-content: flex-start;
        margin-top: 20px;
    }

    .quotation-logo-text {
        font-size: 20px !important;
    }
    
    .quotation-logo-image {
        display: none !important;
    }

    .input-wrapper .input-icon {
        font-size: 16px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }

    .input-wrapper .form-control {
        padding-left: 42px;
    }

    .header-content {
        padding: 12px 15px;
        gap: 16px;
    }

    .logo-image {
        height: 32px !important;
        max-width: 160px !important;
        min-width: 110px !important;
        width: auto !important;
        display: block !important;
    }

    .login-logo-image {
        max-width: 120px !important;
        max-height: 40px !important;
    }

    .quotation-logo-text {
        font-size: 18px !important;
    }
    
    .quotation-logo-image {
        display: none !important;
    }
}

/* Search Tabs */
.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #718096;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #4299e1;
    background: #f7fafc;
}

.tab-btn.active {
    color: #4299e1;
    border-bottom-color: #4299e1;
    background: #f7fafc;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
    display: inline-block;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: #f7fafc;
    border-color: #4299e1;
    color: #4299e1;
}

.pagination-btn.active {
    background: #4299e1;
    border-color: #4299e1;
    color: white;
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f7fafc;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #718096;
}

.pagination-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    color: #718096;
    font-size: 14px;
}

.pagination-info select {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 5px 8px;
    background: white;
    cursor: pointer;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.draft {
    background: #fed7d7;
    color: #c53030;
}

.status-badge.sent {
    background: #bee3f8;
    color: #2c5282;
}

.status-badge.accepted {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.rejected {
    background: #fed7d7;
    color: #c53030;
}

/* ============================================
   MODERN DASHBOARD LAYOUT (SaaS Style)
   ============================================ */

/* Typography - Inter Font Stack */
body.dashboard-body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 14px;
}

body.dashboard-body a,
body.dashboard-body button {
    pointer-events: auto;
    cursor: pointer;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background-color: #1e293b;
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    pointer-events: auto;
    border-right: 1px solid #2d3748;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    text-decoration: none !important;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    cursor: pointer;
    position: relative;
    z-index: 1;
    letter-spacing: 0.025em;
}

.sidebar-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sidebar-nav-item.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-left-color: #3b82f6;
}

.sidebar-nav-item:active {
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.sidebar-user-role {
    font-size: 12px;
    color: #94a3b8;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.dashboard-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 24px 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    pointer-events: auto;
}

.dashboard-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}

.dashboard-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.dashboard-search {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dashboard-container {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
}

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-blue {
    background-color: #dbeafe;
    color: #2563eb;
}

.stat-icon-purple {
    background-color: #ede9fe;
    color: #7c3aed;
}

.stat-icon-green {
    background-color: #d1fae5;
    color: #059669;
}

.stat-icon-orange {
    background-color: #fed7aa;
    color: #ea580c;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Card */
.dashboard-card {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.dashboard-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

/* Modern Table Styles */
.table-container {
    overflow-x: auto;
}

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

.dashboard-table thead {
    background-color: #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dashboard-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f1f5f9;
    white-space: nowrap;
}

.dashboard-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.dashboard-table tbody tr:hover {
    background-color: #f8fafc;
}

.dashboard-table td {
    padding: 10px 12px;
    font-size: 14px;
    color: #475569;
    vertical-align: middle;
    white-space: nowrap;
}

/* Description column with line-clamp */
.dashboard-table td.description-cell {
    max-width: 300px;
}

.dashboard-table td.description-cell .description-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: 2.8em;
}

/* Compact Items Table - Single Line Professional Layout */
.items-table-compact {
    table-layout: fixed;
    font-size: 13px;
}

.items-table-compact thead th {
    font-size: 11px;
    padding: 8px 12px;
    white-space: nowrap;
}

.items-table-compact tbody tr {
    white-space: nowrap;
    border-bottom: 1px solid #f1f5f9;
    height: 40px;
}

.items-table-compact tbody tr:hover {
    background-color: #f8fafc;
}

.items-table-compact tbody td {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1.4;
}

/* Column Widths - Fixed Layout Distribution */
.items-table-compact .col-item-code {
    width: 120px;
}

.items-table-compact .col-item-name {
    width: 20%;
}

.items-table-compact .col-description {
    width: 25%;
}

.items-table-compact .col-price {
    width: 100px;
    text-align: right;
}

.items-table-compact .col-unit {
    width: 80px;
    text-align: right;
}

.items-table-compact .col-actions {
    width: 100px;
    text-align: center;
}

/* Quotation Number Badge Style */
.quotation-number-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 600;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Item Code Badge Style */
.items-table-compact .item-code-badge {
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 32px;
    height: 36px;
    display: inline-block;
}

/* Item Name & Description - Single Line with Ellipsis */
.items-table-compact .item-name-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1e293b;
}

.items-table-compact .description-cell-single {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}

/* Price Cells - Right Aligned */
.items-table-compact .price-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.items-table-compact .selling-price-bold {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
}

.items-table-compact .unit-cell {
    text-align: right;
    color: #64748b;
}

/* Icon-Based Action Buttons */
.action-buttons-icon {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.action-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background-color: transparent;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.action-btn-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.action-btn-edit:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.action-btn-edit:active {
    background-color: #dbeafe;
    transform: scale(0.95);
}

.action-btn-delete:hover {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.action-btn-delete:active {
    background-color: #fee2e2;
    transform: scale(0.95);
}

/* Compact Kits Table - Single Line Professional Layout */
.kits-table-compact {
    table-layout: fixed;
    font-size: 13px;
}

.kits-table-compact thead th {
    font-size: 11px;
    padding: 8px 12px;
    white-space: nowrap;
}

.kits-table-compact tbody tr {
    white-space: nowrap;
    border-bottom: 1px solid #f1f5f9;
    height: 40px;
}

.kits-table-compact tbody tr:hover {
    background-color: #f8fafc;
}

.kits-table-compact tbody td {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    line-height: 1.4;
}

/* Column Widths - Fixed Layout Distribution */
.kits-table-compact .col-kit-code {
    width: 140px;
}

.kits-table-compact .col-kit-name {
    width: 20%;
}

.kits-table-compact .col-description {
    width: 30%;
}

.kits-table-compact .col-items-count {
    width: 120px;
    text-align: center;
}

.kits-table-compact .col-created {
    width: 120px;
}

.kits-table-compact .col-actions {
    width: 140px;
    text-align: center;
}

/* Kit Code Badge Style */
.kits-table-compact .kit-code-badge {
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', 'Menlo', 'Courier New', monospace;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #1e40af;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 32px;
    height: 36px;
    display: inline-block;
}

/* Kit Name & Description - Single Line with Ellipsis */
.kits-table-compact .kit-name-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1e293b;
}

.kits-table-compact .description-cell-single {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 12px;
}

/* Items Count Badge */
.items-count-badge {
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
    display: inline-block;
}

/* Created Date Cell */
.kits-table-compact .created-cell {
    color: #64748b;
    font-size: 12px;
}

/* Icon-Based Action Buttons for Kits (30x30px) */
.kits-table-compact .action-buttons-icon {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.kits-table-compact .action-btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background-color: transparent;
    color: #64748b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.kits-table-compact .action-btn-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.items-table-compact .action-btn-icon {
    width: 30px;
    height: 30px;
}

.kits-table-compact .action-btn-items:hover {
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.kits-table-compact .action-btn-items:active {
    background-color: #e2e8f0;
    transform: scale(0.95);
}

.kits-table-compact .action-btn-copy:hover {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
}

.kits-table-compact .action-btn-copy:active {
    background-color: #dcfce7;
    transform: scale(0.95);
}

.kits-table-compact .action-btn-edit:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.kits-table-compact .action-btn-edit:active {
    background-color: #dbeafe;
    transform: scale(0.95);
}

.kits-table-compact .action-btn-delete:hover {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.kits-table-compact .action-btn-delete:active {
    background-color: #fee2e2;
    transform: scale(0.95);
}

.dashboard-table td .btn {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.table-cell-bold {
    font-weight: 600;
    color: #0f172a;
}

.table-empty-row {
    height: auto;
}

.table-empty {
    padding: 0;
    border: none;
}

.empty-state {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.empty-state-icon {
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state-text {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 12px 0;
}

.empty-state-link {
    color: #667eea;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.empty-state-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Status Pills */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 4px;
    vertical-align: middle;
}

.status-pill.status-draft {
    background-color: #fef3c7;
    color: #92400e;
}

.status-pill.status-sent {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-pill.status-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pill.status-accepted {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pill.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background-color: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.btn-primary:hover {
    background-color: #4f46e5;
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.btn-secondary:active {
    background-color: #f1f5f9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
    border: none;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: #ffffff;
}

/* Footer in Dashboard Layout */
body.dashboard-body .footer {
    margin-top: 0;
    margin-left: 260px;
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 20px 32px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    body.dashboard-body .footer {
        margin-left: 240px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    body.dashboard-body .footer {
        margin-left: 0;
    }
    
    .dashboard-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dashboard-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .dashboard-search {
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        padding: 20px;
    }
    
    .dashboard-table thead {
        position: relative;
    }
}

/* Quotation Form Panels */
.quotation-panel {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
}

.panel-header {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Modern Input Styling */
.modern-input {
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px 8px 40px;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff;
    color: #1e293b;
}

.modern-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-input::placeholder {
    color: #94a3b8;
}

/* Input Icons - Slate Gray */
.quotation-panel .input-icon {
    color: #94a3b8;
    left: 12px;
    width: 16px;
    height: 16px;
}

.quotation-panel .input-wrapper:focus-within .input-icon {
    color: #6366f1;
}

/* Textarea Styling */
textarea.modern-input {
    height: auto;
    min-height: 80px;
    padding: 8px 12px;
    resize: vertical;
}

/* Select Styling */
select.modern-input,
select.form-control {
    height: 38px;
    padding-right: 32px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

/* Unified Search */
.unified-search-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.unified-search-wrapper .input-wrapper {
    position: relative;
}

.unified-search-wrapper .search-input {
    width: 100%;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8fafc;
}

.search-result-kit {
    background-color: #f8fafc;
}

.search-result-kit:hover {
    background-color: #f1f5f9;
}

/* Items Table Styling */
.quotation-panel .table-container {
    margin-bottom: 10px;
}

.quotation-panel .dashboard-table {
    margin-top: 0;
}

.quotation-panel .dashboard-table tbody tr:last-child {
    border-bottom: none;
}

.quotation-panel .dashboard-table td input[type="number"],
.table-input-number {
    height: 40px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 100px;
    transition: all 0.2s;
    background-color: #ffffff;
}

.quotation-panel .dashboard-table td input[type="number"]:focus,
.table-input-number:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Summary Block */
.summary-block {
    background-color: #f8fafc;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 12px;
    text-align: right;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.summary-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

.summary-total {
    padding-top: 16px;
    border-top: 2px solid #e2e8f0;
    margin-top: 12px;
}

.summary-total .summary-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.summary-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

/* Form Actions */
.form-actions-modern {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-end;
}

.btn-primary-modern {
    background-color: #6366f1;
    color: #ffffff;
    font-weight: 600;
    height: 38px;
    padding: 0 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary-modern:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary-modern {
    background-color: transparent;
    color: #475569;
    font-weight: 500;
    height: 38px;
    padding: 0 20px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-secondary-modern:hover {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions-modern {
        flex-direction: column;
    }
    
    .btn-primary-modern,
    .btn-secondary-modern {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }

    body {
        background: white;
    }

    .header, .footer, .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   PROFESSIONAL POLISH - PHASE 1, 2, 4
   ============================================ */

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Form Submission Feedback */
.form-submitting {
    opacity: 0.6;
    pointer-events: none;
}

.form-submitting .btn-primary-modern,
.form-submitting .btn-primary {
    background: #94a3b8;
    cursor: wait;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 300px;
    max-width: 90%;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.5;
}

/* Mobile Sidebar */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: #6366f1;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.2s ease;
    }
    
    .mobile-menu-btn:hover {
        background: #4f46e5;
        transform: scale(1.05);
    }
    
    .mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    .main-content {
        margin-left: 0;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .dashboard-header {
        padding-left: 60px; /* Space for menu button */
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
        left: -100%;
    }
    
    .sidebar-nav-item span {
        font-size: 16px;
    }
    
    .sidebar-footer {
        padding: 16px;
    }
    
    .mobile-menu-btn {
        width: 44px;
        height: 44px; /* Touch-friendly size */
    }
}

/* Responsive Tables - Card Layout on Mobile */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .dashboard-table {
        min-width: 600px; /* Prevent too much compression */
    }
    
    /* Stack table on very small screens */
    @media (max-width: 480px) {
        .dashboard-table,
        .dashboard-table thead,
        .dashboard-table tbody,
        .dashboard-table th,
        .dashboard-table td,
        .dashboard-table tr {
            display: block;
        }
        
        .dashboard-table thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }
        
        .dashboard-table tr {
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            margin-bottom: 16px;
            padding: 12px;
            background: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }
        
        .dashboard-table td {
            border: none;
            position: relative;
            padding: 8px 8px 8px 50% !important;
            text-align: left;
            white-space: normal;
        }
        
        .dashboard-table td:before {
            content: attr(data-label);
            position: absolute;
            left: 8px;
            width: 45%;
            padding-right: 10px;
            white-space: nowrap;
            font-weight: 600;
            color: #64748b;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .dashboard-table td:empty:before {
            display: none;
        }
    }
}

/* Ensure no green borders anywhere */
input.form-control,
select.form-control,
textarea.form-control {
    border-color: #cbd5e1 !important;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Keyboard Navigation Focus Styles */
*:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #6366f1;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

