:root{
    --bg:#3f3f3f;
    --bg2:#525252;
    --sidebar:#4a4a4a;
    --panel:#5b5b5b;
    --panel2:#686868;
    --input:#747474;
    --text:#ffffff;
    --muted:#eeeeee;
    --gold:#c9a227;
    --gold-light:#e1c15a;
    --border:#c9a227;
}

*{box-sizing:border-box}

body{
    margin:0;
    font-family:Arial,sans-serif;
    background:linear-gradient(135deg,var(--bg),var(--bg2));
    color:var(--text);
    font-size:17px;
}

.sidebar{
    position:fixed;
    left:0;
    top:0;
    width:320px;
    height:100vh;
    background:var(--sidebar);
    border-right:3px solid var(--gold);
    padding:30px;
}

.logo{
    width:210px;
    display:block;
    margin:0 auto 38px;
}

.menu a{
    display:block;
    color:white;
    text-decoration:none;
    padding:17px 20px;
    margin:12px 0;
    border-radius:14px;
    font-size:18px;
    font-weight:700;
}

.menu a:hover,
.menu .active{
    background:linear-gradient(135deg,var(--gold-light),var(--gold));
    color:#222;
}

.main{
    margin-left:350px;
    padding:40px;
}

.top{
    border-bottom:2px solid var(--gold);
    padding-bottom:25px;
    margin-bottom:30px;
}

h1{
    font-size:40px;
    margin:0 0 10px;
    color:white;
}

h2{
    font-size:28px;
    color:var(--gold-light);
}

p{
    color:var(--muted);
    line-height:1.6;
}

.gold{color:var(--gold-light)}

.panel,
.card,
.box,
.table,
.auth-box{
    background:linear-gradient(145deg,var(--panel),#4c4c4c);
    border:1px solid var(--gold);
    border-radius:22px;
    padding:30px;
    box-shadow:0 0 28px rgba(201,162,39,.15);
}

.cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:25px;
    margin-bottom:30px;
}

.card h2{
    font-size:44px;
    margin:0;
    color:white;
}

.grid,
.user-layout{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:28px;
}

label{
    display:block;
    font-size:17px;
    font-weight:800;
    color:white;
    margin-bottom:6px;
}

input,
select,
textarea,
.input{
    width:100%;
    padding:17px;
    background:var(--input);
    color:white;
    border:2px solid var(--gold);
    border-radius:14px;
    margin:8px 0 20px;
    font-size:17px;
    outline:none;
}

input::placeholder,
textarea::placeholder{
    color:#f1f1f1;
}

input:focus,
select:focus,
textarea:focus,
.input:focus{
    border-color:#ffe17a;
    box-shadow:0 0 0 4px rgba(201,162,39,.25);
}

button,
.btn{
    display:inline-block;
    background:linear-gradient(135deg,var(--gold-light),var(--gold));
    color:#222;
    border:0;
    padding:15px 24px;
    border-radius:14px;
    font-size:17px;
    font-weight:900;
    cursor:pointer;
    text-decoration:none;
}

button:hover,
.btn:hover{
    filter:brightness(1.08);
}

.upload,
.upload-box{
    border:2px dashed var(--gold);
    background:var(--panel2);
    border-radius:18px;
    padding:25px;
    text-align:center;
    color:white;
    margin-bottom:20px;
}

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

th,td{
    padding:16px;
    border-bottom:1px solid rgba(255,255,255,.18);
    text-align:left;
}

th{
    color:var(--gold-light);
}

a{
    color:#ffe17a;
    font-weight:700;
}

.badge{
    padding:8px 14px;
    border-radius:999px;
    font-weight:800;
    font-size:14px;
}

.open{
    background:#7d5a00;
    color:white;
}

.in_progress{
    background:#9b7a14;
    color:white;
}

.closed{
    background:#2f7d44;
    color:white;
}

.chat{
    background:var(--panel2);
    border:1px solid var(--gold);
    border-radius:16px;
    padding:18px;
    margin-bottom:14px;
}

.status-line{
    border-left:3px solid var(--gold);
    padding:4px 0 22px 20px;
    color:white;
}

.error{
    background:#6b1d1d;
    color:#ffd6d6;
    padding:14px;
    border-radius:12px;
}

.success{
    background:#1d6b33;
    color:#dcffe4;
    padding:14px;
    border-radius:12px;
}

/* LOGIN + REGISTER */

.auth-body{
    min-height:100vh;
    display:flex;
    background:linear-gradient(135deg,var(--bg),var(--bg2));
}

.auth-left{
    width:42%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--sidebar);
    border-right:3px solid var(--gold);
    padding:40px;
}

.auth-left img{
    width:220px;
    max-width:220px;
    height:auto;
}

.auth-right{
    width:58%;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px;
}

.auth-box{
    width:100%;
    max-width:430px;
}

.auth-box h1{
    font-size:34px;
}

.auth-box p{
    margin-bottom:24px;
}

/* FOOTER */

.footer{
    text-align:center;
    margin-top:30px;
    padding-top:20px;
    border-top:2px solid var(--gold);
    color:white;
}

/* MOBILE */

@media(max-width:900px){
    .sidebar{
        position:relative;
        width:100%;
        height:auto;
    }

    .main{
        margin-left:0;
        padding:24px;
    }

    .grid,
    .user-layout{
        grid-template-columns:1fr;
    }

    .auth-body{
        flex-direction:column;
    }

    .auth-left{
        width:100%;
        border-right:0;
        border-bottom:3px solid var(--gold);
        padding:35px;
    }

    .auth-left img{
        width:160px;
        max-width:160px;
    }

    .auth-right{
        width:100%;
        padding:25px;
    }

    .auth-box{
        max-width:100%;
    }

    h1{
        font-size:30px;
    }
}
/* PREMIUM COMPANY SELECT FIX */

select[name="company_id"]{
    min-height:64px;
    font-size:20px;
    font-weight:800;
    background:#1a1a1a;
    color:#ffffff;
    border:3px solid var(--gold);
    border-radius:18px;
    padding:18px 22px;
    cursor:pointer;
}
    color:#ffffff;
    border:3px solid var(--gold);
    border-radius:18px;
    padding:18px 22px;
    cursor:pointer;
}

select[name="company_id"]:focus{
    border-color:#ffe17a;
    box-shadow:0 0 0 5px rgba(201,162,39,.30);
}

select[name="company_id"] option{
    background:#1a1a1a;
    color:white;
    font-size:18px;
    padding:15px;
}
/* MOBILE RESPONSIVE FINAL */

@media(max-width:900px){

    body{
        font-size:16px;
    }

    .sidebar{
        position:relative;
        width:100%;
        height:auto;
        padding:22px;
        border-right:0;
        border-bottom:3px solid var(--gold);
    }

    .logo{
        width:150px;
        margin:0 auto 20px;
    }

    .menu{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    .menu a{
        margin:0;
        padding:14px;
        font-size:15px;
        text-align:center;
    }

    .main{
        margin-left:0;
        padding:18px;
    }

    h1{
        font-size:28px;
        line-height:1.2;
    }

    h2{
        font-size:22px;
    }

    .cards,
    .grid,
    .user-layout{
        grid-template-columns:1fr;
        gap:18px;
    }

    .panel,
    .card,
    .box,
    .table{
        padding:20px;
        border-radius:18px;
    }

    input,
    select,
    textarea,
    .input{
        font-size:16px;
        padding:15px;
    }

    button,
    .btn{
        width:100%;
        text-align:center;
        margin-bottom:10px;
    }

    table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }

    th,td{
        padding:12px;
        font-size:14px;
    }

    .auth-body{
        flex-direction:column;
    }

    .auth-left{
        width:100%;
        border-right:0;
        border-bottom:3px solid var(--gold);
        padding:25px;
    }

    .auth-left img{
        width:130px;
        max-width:130px;
    }

    .auth-right{
        width:100%;
        padding:20px;
    }

    .auth-box{
        max-width:100%;
        padding:24px;
    }
}
.lang-switch{
    display:flex;
    gap:8px;
    justify-content:center;
    margin-bottom:25px;
}

.lang-switch a{
    background:#222;
    border:1px solid var(--gold);
    color:#ffe17a;
    padding:8px 12px;
    border-radius:10px;
    text-decoration:none;
    font-weight:800;
}