/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #555;
    margin-bottom: 30px;
    font-size: 1.2em;
    font-weight: normal;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.login-info p {
    margin: 0;
    color: #666;
}

/* Header */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h1 {
    color: #667eea;
    font-size: 1.5em;
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-info {
    color: #555;
    font-weight: 500;
}

.nav-link {
    color: #667eea;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    background: #667eea;
    color: white;
}

.nav-link.logout {
    background: #dc3545;
    color: white;
}

.nav-link.logout:hover {
    background: #c82333;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cv-menu h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.cv-menu ul {
    list-style: none;
}

.cv-menu ul li {
    margin-bottom: 10px;
}

.menu-link {
    display: block;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.menu-link:hover,
.menu-link.active {
    background: #667eea;
    color: white;
}

/* Main Content */
.content {
    flex: 1;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* CV Sections */
.cv-section {
    display: none;
    animation: fadeIn 0.5s;
}

.cv-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cv-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.section-content {
    margin-top: 20px;
}

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

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: #667eea;
    font-size: 0.9em;
}

.info-item span {
    color: #555;
}

.profile-summary {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.profile-summary h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.profile-summary p {
    color: #555;
}

/* Experience & Education Items */
.experience-item,
.education-item,
.certification-item {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.experience-item h3,
.education-item h3,
.certification-item h3 {
    color: #333;
    margin-bottom: 5px;
}

.experience-item h4,
.education-item h4,
.certification-item h4 {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 10px;
}

.date-range {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.date-range .editable-container {
    display: inline-flex;
    align-items: center;
    width: auto;
}

.date-range .edit-input {
    width: auto;
    padding: 2px 5px;
}

.date-label {
    font-weight: 600;
    color: #555;
}

.date-separator {
    margin: 0 5px;
}

.description {
    color: #555;
    margin-top: 10px;
}

.field {
    color: #666;
    font-style: italic;
}

.credential {
    color: #666;
    font-size: 0.9em;
}

/* Skills */
.skills-category {
    margin-bottom: 30px;
}

.skills-category h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.skill-name {
    font-weight: 500;
    color: #333;
}

.skill-level {
    color: #667eea;
    font-size: 0.9em;
}

/* Languages */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.language-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.language-name {
    font-weight: 500;
    color: #333;
}

.language-level {
    color: #667eea;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

.btn-edit {
    background: #28a745;
    color: white;
}

.btn-edit:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

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

/* Messages */
.error-message,
.success-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Admin Content */
.admin-content {
    width: 100%;
}

.admin-content h2 {
    color: #667eea;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.admin-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-section h3 {
    color: #667eea;
    margin-bottom: 20px;
}

/* User Form */
.user-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Tables */
.users-table,
.logs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.logs-table th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

.users-table td,
.logs-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.users-table tr:hover,
.logs-table tr:hover {
    background: #f8f9fa;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Filter Form */
.filter-form .form-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.filter-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    color: #555;
}

/* Profile Photo in Corner */
.profile-photo-corner {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.profile-photo-corner img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
}

.content {
    position: relative;
    padding-top: 50px;
}

/* Language Switcher */
.lang-switcher {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.lang-switcher .btn {
    width: 100%;
}

/* Upload Form */
.upload-form .form-group {
    margin-bottom: 20px;
}

.current-photo {
    margin-bottom: 20px;
}

/* CV Form */
.cv-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cv-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.cv-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.quick-links ul {
    list-style: none;
    padding-left: 0;
}

.quick-links li {
    padding: 8px 0;
}

/* Responsive Design */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .cv-menu ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .cv-menu ul li {
        margin-bottom: 0;
    }

    .filter-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form .form-group {
        margin-bottom: 15px;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .personal-info-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid,
    .languages-grid {
        grid-template-columns: 1fr;
    }

    .users-table,
    .logs-table {
        font-size: 0.85em;
    }

    .users-table td,
    .logs-table td,
    .users-table th,
    .logs-table th {
        padding: 8px;
    }

    .profile-photo-corner img {
        width: 100px;
        height: 100px;
    }

    .content {
        padding-top: 120px;
    }
}

/* Inline Editing Styles */
.editable-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.edit-input {
    padding: 5px 10px;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border-radius: 4px;
    width: 100%;
    transition: all 0.3s;
}

.edit-input:disabled {
    background: transparent;
    border-color: transparent;
    color: inherit;
    cursor: default;
}

.edit-input:not(:disabled) {
    background: #fff;
    border-color: #ccc;
    color: #333;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.edit-controls {
    display: flex;
    gap: 5px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.editable-container:hover .edit-controls,
.edit-input:not(:disabled)+.edit-controls {
    opacity: 1;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 2px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-modify {
    color: #f39c12;
}

.btn-save {
    color: #27ae60;
}

.btn-cancel {
    color: #e74c3c;
}

.btn-delete {
    color: #c0392b;
}

.add-item-container {
    margin-bottom: 20px;
    text-align: right;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-delete-item {
    float: right;
    font-size: 0.9em;
    color: #c0392b;
    background: #fff;
    border: 1px solid #c0392b;
    border-radius: 3px;
    padding: 2px 5px;
    margin-left: 10px;
}

.btn-delete-item:hover {
    background: #c0392b;
    color: #fff;
}

.experience-item,
.education-item,
.certification-item {
    position: relative;
}

   / *   M o d a l   S t y l e s   * /     . m o d a l    {
                 d i s p l a y :    n o n e ;
                   p o s i t i o n :    f i x e d ;
                   z - i n d e x :    1 0 0 0 ;
                   l e f t :    0 ;
                 t o p :    0 ;
                 w i d t h :    1 0 0 % ;
                   h e i g h t :    1 0 0 % ;
                   o v e r f l o w :    a u t o ;
                   b a c k g r o u n d - c o l o r :    r g b a ( 0 ,  0 ,  0 ,  0 . 4 ) ;
           
}

         . m o d a l - c o n t e n t    {
                 b a c k g r o u n d - c o l o r :    # f e f e f e ;
                 m a r g i n :    1 5 %   a u t o ;
                   p a d d i n g :    2 0 p x ;
                 b o r d e r :    1 p x   s o l i d   # 8 8 8 ;
                 w i d t h :    8 0 % ;
                   m a x - w i d t h :    5 0 0 p x ;
                 b o r d e r - r a d i u s :    8 p x ;
                 b o x - s h a d o w :    0   4 p x   8 p x   r g b a ( 0 ,  0 ,  0 ,  0 . 1 ) ;
         
}

         . c l o s e    {
                 c o l o r :    # a a a ;
                 f l o a t :    r i g h t ;
                 f o n t - s i z e :    2 8 p x ;
                 f o n t - w e i g h t :    b o l d ;
                 c u r s o r :    p o i n t e r ;
         
}

         . c l o s e : h o v e r ,
     . c l o s e : f o c u s    {
                 c o l o r :    b l a c k ;
                 t e x t - d e c o r a t i o n :    n o n e ;
                 c u r s o r :    p o i n t e r ;
         
}

         . f o r m - g r o u p    {
                 m a r g i n - b o t t o m :    1 5 p x ;
         
}

         . f o r m - g r o u p   l a b e l    {
                 d i s p l a y :    b l o c k ;
                 m a r g i n - b o t t o m :    5 p x ;
                 f o n t - w e i g h t :    b o l d ;
         
}

      
 / *   D a t e   G r i d   L a y o u t   * /  
 . d a t e - g r i d   {  
         d i s p l a y :   g r i d ;  
         g r i d - t e m p l a t e - c o l u m n s :   1 f r   1 f r ;  
         g a p :   2 0 p x ;  
         m a r g i n - b o t t o m :   1 5 p x ;  
 }  
  
 . d a t e - c o l u m n   {  
         d i s p l a y :   f l e x ;  
         f l e x - d i r e c t i o n :   c o l u m n ;  
         g a p :   5 p x ;  
 }  
  
 . d a t e - c o l u m n   . d a t e - l a b e l   {  
         f o n t - s i z e :   0 . 8 5 e m ;  
         c o l o r :   # 6 6 7 e e a ;  
         f o n t - w e i g h t :   6 0 0 ;  
         t e x t - t r a n s f o r m :   u p p e r c a s e ;  
         l e t t e r - s p a c i n g :   0 . 5 p x ;  
 }  
  
 / *   A d j u s t   e d i t a b l e   c o n t a i n e r   i n   d a t e   c o l u m n s   * /  
 . d a t e - c o l u m n   . e d i t a b l e - c o n t a i n e r   {  
         w i d t h :   1 0 0 % ;  
 }  
  
 . d a t e - c o l u m n   . e d i t - i n p u t   {  
         w i d t h :   1 0 0 % ;  
         p a d d i n g :   8 p x ;  
         b o r d e r :   1 p x   s o l i d   # d d d ;  
         b o r d e r - r a d i u s :   4 p x ;  
 }  
 