/* ERP Style Customizations */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
}

/* Sidebar Styling */
#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    transition: margin .25s ease-out;
    background-color: #2c3e50;
    color: #ecf0f1;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    background-color: #1a252f;
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

.sidebar-link {
    color: #bdc3c7;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-bottom: 1px solid #34495e;
}

.sidebar-link:hover {
    background-color: #34495e;
    color: #fff;
    text-decoration: none;
}

.sidebar-submenu {
    background-color: #34495e;
    display: none; /* Hidden by default */
    padding-left: 20px;
}

.sidebar-submenu.show {
    display: block;
}

.sidebar-link.active {
    background-color: #2980b9;
    color: #fff;
}

/* Content Area */
.content-header {
    background-color: #fff;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
}

.card {
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* Animation for validation error */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake-error {
    animation: shake 0.5s;
    border-color: #dc3545 !important;
}

/* TomSelect Validation Styling */
.ts-wrapper.is-invalid .ts-control {
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: 4.125rem !important;
}

.validation-error-text {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

/* Construction Page Styles */
.construction-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 100px);
    text-align: center;
}

.construction-icon {
    font-size: 5rem;
    color: #f39c12;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

.construction-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.construction-text {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
}

.gear-animation {
    animation: rotate 4s linear infinite;
    display: inline-block;
}

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